Spaces:
Sleeping
Sleeping
File size: 351 Bytes
cc65c1f | 1 2 3 4 5 6 7 8 9 10 11 | from groq import Groq
async def run_groq(messages : list , groq_client : Groq, model = 'llama-3.3-70b-versatile') -> str :
chat_completion = groq_client.chat.completions.create(
messages = messages ,
model = model ,
response_format = {'type' : 'json_object'}
)
return chat_completion.choices[0].message.content |