Skip to content

Commit 09d887f

Browse files
committed
providers updated
1 parent a7a4ecf commit 09d887f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/llm_provider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def chat_completion(self, messages: list, model: str, max_tokens: int = 512) ->
4646
messages=messages,
4747
max_tokens=max_tokens,
4848
)
49-
return response.choices[0].message.content
49+
# LiteLLM returns an OpenAI-compatible dict-like response
50+
return response["choices"][0]["message"]["content"]
5051

5152
def get_llm_provider(provider_type: str, api_key: str) -> LLMProvider:
5253
"""Factory function to get the appropriate LLM provider"""

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def main():
55
parser = argparse.ArgumentParser(
6-
description="Generate output using OpenAI's API")
6+
description="Generate output using OpenAI's API or custom LLM using LiteLLM")
77
parser.add_argument('--json_file', type=str, required=True,
88
help="Path to the JSON file with input data")
99

0 commit comments

Comments
 (0)