Skip to content

Commit

Permalink
fix bug with using enum as string
Browse files Browse the repository at this point in the history
  • Loading branch information
abi committed Mar 19, 2024
1 parent 81c4fbe commit 212aa22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ async def stream_openai_response(
model = Llm.GPT_4_VISION

# Base parameters
params = {"model": model, "messages": messages, "stream": True, "timeout": 600}
params = {
"model": model.value,
"messages": messages,
"stream": True,
"timeout": 600,
}

# Add 'max_tokens' only if the model is a GPT4 vision model
if model == Llm.GPT_4_VISION:
Expand Down

0 comments on commit 212aa22

Please sign in to comment.