X.AI API // api.x.ai/v1
What is the date of grok-beta model knowledge? // 2023
from openai import OpenAI
from IPython.display import Markdown, display
client = OpenAI(
api_key=XAI_API_KEY,
base_url="https://api.x.ai/v1",
)
system_prompt="You are Grok, a chatbot that knows the latest news."
user_prompt="What is the latest date of your knowledege?"
completion = client.chat.completions.create(
model="grok-beta",
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt},
],
)
display(Markdown(completion.choices[0].message.content))
My knowledge is current up until October 2023. If you have any questions or need information, feel free to ask!