Skip to content

Commit

Permalink
Remove extraneous kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Oct 3, 2024
1 parent 1dc35b2 commit 43d7971
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/cwhy/cwhy.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
import argparse
import subprocess
import sys
from typing import Any

import llm_utils
import openai

from . import conversation, prompts


def complete(
client: openai.OpenAI, args: argparse.Namespace, user_prompt: str, **kwargs: Any
):
def complete(client: openai.OpenAI, args: argparse.Namespace, user_prompt: str):
try:
completion = client.chat.completions.create(
model=args.llm,
messages=[{"role": "user", "content": user_prompt}],
timeout=args.timeout,
**kwargs,
)
return completion
except openai.NotFoundError as e:
Expand Down Expand Up @@ -81,13 +77,9 @@ def main(args: argparse.Namespace) -> None:


def evaluate_text_prompt(
client: openai.OpenAI,
args: argparse.Namespace,
prompt: str,
wrap: bool = True,
**kwargs: Any,
client: openai.OpenAI, args: argparse.Namespace, prompt: str, wrap: bool = True
) -> str:
completion = complete(client, args, prompt, **kwargs)
completion = complete(client, args, prompt)

msg = f"Analysis from {args.llm}:"
print(msg)
Expand Down

0 comments on commit 43d7971

Please sign in to comment.