Update main.py

This commit is contained in:
Ishaan Jaff 2023-08-30 20:14:09 -07:00 committed by GitHub
parent de72df712e
commit e7d74b3d1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,8 +32,7 @@ def api_completion():
try:
# pass in data to completion function, unpack data
selected_llm = random.choices(list(llm_dict.keys()), weights=list(llm_dict.values()))[0]
data['model'] = selected_llm
response = completion(**data)
response = completion(**data, model=selected_llm)
except Exception as e:
print(f"got error{e}")
return response, 200