X.AI API // api.x.ai/v1

What is the difference to other models/APIs? // no real-time data

sbagency
Nov 11, 2024
https://x.com/xai/status/1853505214181232828

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!

No real-time data…

--

--

sbagency
sbagency

Written by sbagency

Tech/biz consulting, analytics, research for founders, startups, corps and govs.

No responses yet