Spaces:
Sleeping
Sleeping
import os | |
from groq import Groq | |
def responsr(prompt): | |
client = Groq( | |
api_key=os.environ['key'], | |
) | |
chat_completion = client.chat.completions.create( | |
messages=[ | |
{ | |
"role": "user", | |
"content": prompt, | |
} | |
], | |
model="llama3-8b-8192", | |
) | |
return (chat_completion.choices[0].message.content) |