FastInferenceChat / examples /getting_started.py
LVKinyanjui's picture
Created a nice chatbot ui with streamlit and gave it a chat history
c6b7e90
raw
history blame contribute delete
368 Bytes
import os
from groq import Groq
client = Groq(
api_key=os.environ.get("GROQ_API_KEY"),
)
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Explain the importance of fast language models",
}
],
model="llama3-8b-8192",
)
print(chat_completion.choices[0].message.content)