Skip to content

Conversation

pierrevalade
Copy link
Contributor

Added ability to fetch completions for a run via the /v1/_/agents/{agent_id}/runs/{run_id}/completions endpoint.

Changes:\n- Added CompletionUsage, Message, Completion, and CompletionsResponse models\n- Added fetch_completions() method to Run class\n- Added comprehensive test suite with success and error cases\n- Added detailed test documentation explaining test rationale\n\nThe fetch_completions method allows retrieving the full conversation history and token usage information for a completed run.

Added ability to fetch completions for a run via the /v1/_/agents/{agent_id}/runs/{run_id}/completions endpoint.

Changes:\n- Added CompletionUsage, Message, Completion, and CompletionsResponse models\n- Added fetch_completions() method to Run class\n- Added comprehensive test suite with success and error cases\n- Added detailed test documentation explaining test rationale\n\nThe fetch_completions method allows retrieving the full conversation history and token usage information for a completed run.
@pierrevalade pierrevalade requested a review from guillaq February 21, 2025 19:28
Fixed type error in Run._agent assignment by making the api field a property in the _AgentBase protocol to match the Agent class implementation. This ensures proper type compatibility between Agent and _AgentBase.
@pierrevalade pierrevalade marked this pull request as ready for review February 21, 2025 19:31
@guillaq guillaq merged commit fb5e7e4 into main Feb 21, 2025
5 checks passed
@guillaq guillaq deleted the feature/run-completions branch February 21, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants