Skip to content

Commit 82d8535

Browse files
authored
CI maintenance (Feb) (#479)
1 parent 5fa6582 commit 82d8535

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

agentlightning/instrumentation/weave.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,24 @@ def annotation_queue_items_query(self, *args: Any, **kwargs: Any) -> Any:
447447
def annotator_queue_items_progress_update(self, *args: Any, **kwargs: Any) -> Any:
448448
raise NotImplementedError()
449449

450+
def calls_complete(self, *args: Any, **kwargs: Any) -> Any:
451+
raise NotImplementedError()
452+
453+
def call_start_v2(self, *args: Any, **kwargs: Any) -> Any:
454+
raise NotImplementedError()
455+
456+
def call_end_v2(self, *args: Any, **kwargs: Any) -> Any:
457+
raise NotImplementedError()
458+
459+
def call_stats(self, *args: Any, **kwargs: Any) -> Any:
460+
raise NotImplementedError()
461+
462+
def trace_usage(self, *args: Any, **kwargs: Any) -> Any:
463+
raise NotImplementedError()
464+
465+
def calls_usage(self, *args: Any, **kwargs: Any) -> Any:
466+
raise NotImplementedError()
467+
450468

451469
# Module-level storage for originals
452470
_original_init_weave_get_server: Callable[..., Any] | None = None

tests/assets/prompt_caches.jsonl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@
4545
{"request": {"messages": [{"content": "Return 1.0 if the answer is 8, else 0.0.", "role": "system"}, {"role": "user", "content": "8"}], "model": "gpt-4.1-mini", "response_format": {"type": "json_schema", "json_schema": {"name": "final_output", "strict": true, "schema": {"properties": {"response": {"title": "Response", "type": "number"}}, "required": ["response"], "title": "OutputType", "type": "object", "additionalProperties": false}}}}, "response": {"choices": [{"content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "protected_material_code": {"filtered": false, "detected": false}, "protected_material_text": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}, "finish_reason": "stop", "index": 0, "logprobs": null, "message": {"annotations": [], "content": "{\"response\":1.0}", "refusal": null, "role": "assistant"}}], "created": 1768794806, "id": "chatcmpl-CzacQt9ezHNd9gmiQ6FD4ACESwfsH", "model": "gpt-4.1-mini-2025-04-14", "object": "chat.completion", "prompt_filter_results": [{"prompt_index": 0, "content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "jailbreak": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}}], "system_fingerprint": "fp_3dcd5944f5", "usage": {"completion_tokens": 8, "completion_tokens_details": {"accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0}, "prompt_tokens": 65, "prompt_tokens_details": {"audio_tokens": 0, "cached_tokens": 0}, "total_tokens": 73}}}
4646
{"request": {"messages": [{"content": "If the question is about math, handoff to MathAgent. Otherwise, handoff to HistoryAgent.", "role": "system"}, {"role": "user", "content": "Who was the first president of the US?"}], "model": "gpt-4.1-mini", "tools": [{"type": "function", "function": {"name": "transfer_to_mathagent", "description": "Handoff to the MathAgent agent to handle the request. ", "parameters": {"additionalProperties": false, "type": "object", "properties": {}, "required": []}, "strict": true}}, {"type": "function", "function": {"name": "transfer_to_historyagent", "description": "Handoff to the HistoryAgent agent to handle the request. ", "parameters": {"additionalProperties": false, "type": "object", "properties": {}, "required": []}, "strict": true}}]}, "response": {"choices": [{"content_filter_results": {}, "finish_reason": "tool_calls", "index": 0, "logprobs": null, "message": {"annotations": [], "content": null, "refusal": null, "role": "assistant", "tool_calls": [{"function": {"arguments": "{}", "name": "transfer_to_historyagent"}, "id": "call_MOjhi5CuL8Tm8Kxd3fbRMNo2", "type": "function"}]}}], "created": 1768794807, "id": "chatcmpl-CzacRL4lFqbo9B1zfzGcxjOmHSEzA", "model": "gpt-4.1-mini-2025-04-14", "object": "chat.completion", "prompt_filter_results": [{"prompt_index": 0, "content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "jailbreak": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}}], "system_fingerprint": "fp_3dcd5944f5", "usage": {"completion_tokens": 13, "completion_tokens_details": {"accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0}, "prompt_tokens": 97, "prompt_tokens_details": {"audio_tokens": 0, "cached_tokens": 0}, "total_tokens": 110}}}
4747
{"request": {"messages": [{"content": "Answer history questions.", "role": "system"}, {"role": "assistant", "content": "For context, here is the conversation so far between the user and the previous agent:\n<CONVERSATION HISTORY>\n1. user: Who was the first president of the US?\n2. function_call: {\"arguments\": \"{}\", \"call_id\": \"call_MOjhi5CuL8Tm8Kxd3fbRMNo2\", \"name\": \"transfer_to_historyagent\", \"id\": \"__fake_id__\"}\n3. function_call_output: {\"call_id\": \"call_MOjhi5CuL8Tm8Kxd3fbRMNo2\", \"output\": \"{\\\"assistant\\\": \\\"HistoryAgent\\\"}\"}\n</CONVERSATION HISTORY>"}], "model": "gpt-4.1-mini"}, "response": {"choices": [{"content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "protected_material_code": {"filtered": false, "detected": false}, "protected_material_text": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}, "finish_reason": "stop", "index": 0, "logprobs": null, "message": {"annotations": [], "content": "The first president of the United States was George Washington. He served as president from 1789 to 1797. If you have any more questions about U.S. history or presidents, feel free to ask!", "refusal": null, "role": "assistant"}}], "created": 1768794809, "id": "chatcmpl-CzacTV4NFaqq7kWCqD2FiM6TxWRvT", "model": "gpt-4.1-mini-2025-04-14", "object": "chat.completion", "prompt_filter_results": [{"prompt_index": 0, "content_filter_results": {}}], "system_fingerprint": "fp_3dcd5944f5", "usage": {"completion_tokens": 44, "completion_tokens_details": {"accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0}, "prompt_tokens": 148, "prompt_tokens_details": {"audio_tokens": 0, "cached_tokens": 0}, "total_tokens": 192}}}
48+
{"request": {"messages": [{"content": "Use the tools to answer the question.", "role": "system"}, {"role": "user", "content": "What is 43*57?"}], "model": "gpt-4.1-mini", "tools": [{"type": "function", "function": {"name": "calculate", "description": "Calculates/evaluates the given expression.", "parameters": {"properties": {"expression": {"title": "Expression", "type": "string"}}, "required": ["expression"], "title": "calculateArguments", "type": "object"}, "strict": false}}]}, "response": {"id": "chatcmpl-D7G2w9XJHOwy3hUB1SrYiqfOl2VKf", "created": 1770622350, "model": "gpt-4.1-mini-2025-04-14", "object": "chat.completion", "system_fingerprint": "fp_3dcd5944f5", "choices": [{"finish_reason": "tool_calls", "index": 0, "message": {"content": null, "role": "assistant", "tool_calls": [{"function": {"arguments": "{\"expression\":\"43*57\"}", "name": "calculate"}, "id": "call_uujNWudc5of9EptJBoM2gst4", "type": "function"}]}}], "usage": {"completion_tokens": 16, "prompt_tokens": 66, "total_tokens": 82, "completion_tokens_details": {"accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0}, "prompt_tokens_details": {"audio_tokens": 0, "cached_tokens": 0}}, "prompt_filter_results": [{"prompt_index": 0, "content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "jailbreak": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}}]}}
49+
{"request": {"messages": [{"content": "Use the tools to answer the question.", "role": "system"}, {"role": "user", "content": "What is 43*57?"}, {"role": "assistant", "content": null, "tool_calls": [{"id": "call_uujNWudc5of9EptJBoM2gst4", "type": "function", "function": {"name": "calculate", "arguments": "{\"expression\":\"43*57\"}"}}]}, {"role": "tool", "tool_call_id": "call_uujNWudc5of9EptJBoM2gst4", "content": [{"type": "text", "text": "2451"}]}], "model": "gpt-4.1-mini", "tools": [{"type": "function", "function": {"name": "calculate", "description": "Calculates/evaluates the given expression.", "parameters": {"properties": {"expression": {"title": "Expression", "type": "string"}}, "required": ["expression"], "title": "calculateArguments", "type": "object"}, "strict": false}}]}, "response": {"id": "chatcmpl-D7G2xbgoXch7TQ9rUf8bF0N8WTCJv", "created": 1770622351, "model": "gpt-4.1-mini-2025-04-14", "object": "chat.completion", "system_fingerprint": "fp_3dcd5944f5", "choices": [{"finish_reason": "stop", "index": 0, "message": {"content": "43 multiplied by 57 is 2451.", "role": "assistant"}, "provider_specific_fields": {"content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "protected_material_code": {"filtered": false, "detected": false}, "protected_material_text": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}}}], "usage": {"completion_tokens": 12, "prompt_tokens": 90, "total_tokens": 102, "completion_tokens_details": {"accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0}, "prompt_tokens_details": {"audio_tokens": 0, "cached_tokens": 0}}, "prompt_filter_results": [{"prompt_index": 0, "content_filter_results": {"hate": {"filtered": false, "severity": "safe"}, "jailbreak": {"filtered": false, "detected": false}, "self_harm": {"filtered": false, "severity": "safe"}, "sexual": {"filtered": false, "severity": "safe"}, "violence": {"filtered": false, "severity": "safe"}}}]}}

0 commit comments

Comments
 (0)