You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromopenaiimportOpenAIclient=OpenAI(api_key="dummy", base_url="http://localhost:8000/v1")
# prompt with more than 16 tokensmessages= [{"role": "user", "content": "Hello! What's your name? What do you do?"}]
# first request to cache the promptresponse=client.chat.completions.create(model="latest",messages=messages,max_tokens=256)
# second request to fetch from prefix cacheresponse=client.chat.completions.create(model="latest",messages=messages,max_tokens=256)
print(response.usage)
Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
The text was updated successfully, but these errors were encountered:
Your current environment
The output of `python collect_env.py`
🐛 Describe the bug
V1 does not report prompt token details if enabled. Seems implementation is missing.
V0 output
V1 output
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: