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
I added a very descriptive title to this question.
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
Commit to Help
I commit to help with one of those options 👆
Example Code
curl-XPOST"https://api.smith.langchain.com/api/v1/runs" \
-H"Content-Type: application/json" \
-H"x-api-key: <API KEY HERE>" \
-d'{"name": "uzair3", "run_type": "llm", "start_time": "2025-01-24T16:05:30Z", "end_time": "2025-01-24T16:05:34Z", "first_token_time": "2025-01-24T16:05:34Z", "inputs": { "system_message": "Your role is to answer questions accurately.", "user_message": "What is the capital of France?" }, "outputs": {"response": "The capital of France is Paris." }}'
Description
We want to track Time to First Token for our runs.
From the documentations I see we need to use first_token_time for that.
I had tried passing "first_token_time": "2025-01-24T16:05:34Z", with my request in multiple formats but it is recording it as "first_token_time":null
Here is my output:
curl -X GET "https://api.smith.langchain.com/api/v1/runs/9a2c2694-1ae5-4949-8968-f2a41cb0f602" \
-H "Content-Type: application/json" \
-H "x-api-key: <API KEY HERE>" \
{"name":"uzair3","inputs":{"system_message":"Your role is to answer questions accurately.","user_message":"What is the capital of France?"},"inputs_preview":"Your role is to answer questions accurately.","run_type":"llm","start_time":"2025-01-24T16:05:30","end_time":"2025-01-24T16:05:34","extra":null,"error":null,"execution_order":1,"serialized":null,"outputs":{"response":"The capital of France is Paris."},"outputs_preview":"The capital of France is Paris.","parent_run_id":null,"manifest_id":null,"manifest_s3_id":null,"events":[],"tags":[],"inputs_s3_urls":null,"outputs_s3_urls":null,"s3_urls":null,"trace_id":"9a2c2694-1ae5-4949-8968-f2a41cb0f602","dotted_order":"20250124T160530000000Z9a2c2694-1ae5-4949-8968-f2a41cb0f602","id":"9a2c2694-1ae5-4949-8968-f2a41cb0f602","status":"success","child_run_ids":null,"direct_child_run_ids":null,"parent_run_ids":[],"feedback_stats":null,"reference_example_id":null,"total_tokens":0,"prompt_tokens":0,"completion_tokens":0,"total_cost":null,"prompt_cost":null,"completion_cost":null,"price_model_id":null,"first_token_time":null,"session_id":"6de1a1bb-654a-44d7-8eb2-48f13833ac2d","app_path":"/o/1754faa3-0e76-408a-8517-996d9ab3fffb/projects/p/6de1a1bb-654a-44d7-8eb2-48f13833ac2d/r/9a2c2694-1ae5-4949-8968-f2a41cb0f602?trace_id=9a2c2694-1ae5-4949-8968-f2a41cb0f602&start_time=2025-01-24T16:05:30","last_queued_at":null,"in_dataset":false,"share_token":null,"trace_tier":"shortlived","trace_first_received_at":"2025-01-24T16:25:10.989689","ttl_seconds":1209600,"trace_upgrade":false,"reference_dataset_id":null}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked other resources
Commit to Help
Example Code
Description
We want to track
Time to First Token
for our runs.From the documentations I see we need to use
first_token_time
for that.I had tried passing
"first_token_time": "2025-01-24T16:05:34Z",
with my request in multiple formats but it is recording it as"first_token_time":null
Here is my output:
System Info
CURL request
Beta Was this translation helpful? Give feedback.
All reactions