Skip to content

Instantly share code, notes, and snippets.

@harupy
Last active August 10, 2023 00:43
Show Gist options
  • Save harupy/8cbaed57603f7bd8913fde7ca493d394 to your computer and use it in GitHub Desktop.
Save harupy/8cbaed57603f7bd8913fde7ca493d394 to your computer and use it in GitHub Desktop.
b"""
{
"id": "chatcmpl-7lG2usbCnpQIBmid2fGZjsT9Wymh4",
"object": "chat.completion.chunk",
"created": 1691497452,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"delta": {"content": " set"},
"finish_reason": null,
}
],
}
"""
{
"id": "chatcmpl-7lGCfKRYr1MWQZg4LUe8kxuKFtuNX",
"object": "chat.completion",
"created": 1691498057,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "...",
},
"finish_reason": "stop",
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 93,
"total_tokens": 105,
},
}
{
...,
"x-ratelimit-limit-requests": "3500",
"x-ratelimit-limit-tokens": "90000",
"x-ratelimit-remaining-requests": "3499",
"x-ratelimit-remaining-tokens": "89482",
"x-ratelimit-reset-requests": "17ms",
"x-ratelimit-reset-tokens": "344ms",
...,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment