Commit Graph

370 Commits

Author SHA1 Message Date
Mery-Sanz 6a28aff0a0 fix function schema test 2025-04-11 08:11:26 +02:00
Mery-Sanz ccdbf5baf9 fix some test 2025-04-11 08:04:19 +02:00
Mery-Sanz 67ab08dce1 add coments and docstring 2025-04-10 09:57:35 +02:00
Mery-Sanz d7fff2a6c3 improve test 2025-04-10 09:42:16 +02:00
Mery-Sanz b75754fdf4 add more test 2025-04-10 09:27:56 +02:00
Mery-Sanz 93803ffa0d add new test and fix previous 2025-04-10 08:54:21 +02:00
Mery-Sanz 627ff5b1f0 modify gitingore 2025-04-10 07:59:39 +02:00
Mery-Sanz 59e8e444ca add test 2025-04-10 07:58:40 +02:00
Mery-Sanz 1bc4b8fd9e final fix 2025-04-09 16:17:06 +02:00
Mery-Sanz f5f43ff000 fix more test 2025-04-09 16:07:58 +02:00
Mery-Sanz dbac371f70 fix more test 2025-04-09 15:59:24 +02:00
Mery-Sanz 24e05fbf2b add 2 more test 2025-04-09 15:54:58 +02:00
Mery-Sanz be6a7ecadd fix test_agent_runner 2025-04-09 15:51:05 +02:00
Mery-Sanz b8ee04a8de fix test_agent_hooks.py and reorganize imports 2025-04-09 15:46:53 +02:00
María Sanz Gómez 2084ec6409 fix tests/test_agent_config.py 2025-04-09 15:42:26 +02:00
Víctor Mayoral Vilches fa198de051 Fix streaming responses in CAI and examples
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-04-03 10:53:33 +02:00
Víctor Mayoral Vilches 9f5073c3a5 CLI output operational
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-04-03 08:19:42 +02:00
Víctor Mayoral Vilches 47bd38b4aa Fix docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-04-02 16:48:23 +02:00
Víctor Mayoral Vilches 62212d04b5 Address issues with litellm and agents SDK
Squeezed in some additional features such as:
- updated get_version()
- various examples for streaming and non-streaming testing

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-04-02 14:03:00 +02:00
Víctor Mayoral Vilches 10a6539d05 Fix issue with instructions
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-04-02 07:28:27 +02:00
Víctor Mayoral Vilches 988c82823a OLLAMA models working
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-31 21:13:15 +02:00
Víctor Mayoral Vilches d3b6f8a1ed Merge remote-tracking branch 'origin/main' into cai 2025-03-31 13:21:34 +02:00
Eric Peter 9c53abe8c1
Databricks MLflow tracing integration (#401) 2025-03-30 23:53:09 -04:00
Víctor Mayoral Vilches 28d98cd3cd Streaming now working for OLLAMA models, but not the rest. Figure it out
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-30 09:21:25 +02:00
Víctor Mayoral Vilches c75c272f36 Made local models work by switching into litellm python APIs
Still some issues with stream versions which needs further
investigation

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-29 20:17:42 +01:00
Víctor Mayoral Vilches 859799c9f4 CLI responding, but only to proprietary models
Need to investigate why self-hosted models via OLLAMA fail API-wise

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 09:48:16 +01:00
Víctor Mayoral Vilches 27d5316a60 Fix paths in docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 08:35:25 +01:00
Víctor Mayoral Vilches ba25c5234f Address error while streaming
[Error occurred during streaming: 1 validation error for ResponseUsage
input_tokens_details
  Input should be a valid dictionary or instance of InputTokensDetails [type=model_type, input_value=InputTokensDetails(prompt...ens=17, cached_tokens=0), input_type=InputTokensDetails]
    For further information visit https://errors.pydantic.dev/2.10/v/model_type]
Location: Traceback (most recent call last):
  File /Users/alias/Alias/research/openai-agents-python/src/cai/cli.py, line 209, in process_streamed_response
    async for event in result.stream_events():
  File /Users/alias/Alias/research/openai-agents-python/src/cai/sdk/agents/result.py, line 186, in stream_events
    raise self._stored_exception
  File /Users/alias/Alias/research/openai-agents-python/src/cai/sdk/agents/run.py, line 539, in _run_streamed_impl
    turn_result = await cls._run_single_turn_streamed(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File /Users/alias/Alias/research/openai-agents-python/src/cai/sdk/agents/run.py, line 641, in _run_single_turn_streamed
    async for event in model.stream_response(
  File /Users/alias/Alias/research/openai-agents-python/src/cai/sdk/agents/models/openai_chatcompletions.py, line 421, in stream_response
    ResponseUsage(
  File /Users/alias/Alias/research/openai-agents-python/env/lib/python3.12/site-packages/pydantic/main.py, line 214, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for ResponseUsage
input_tokens_details
  Input should be a valid dictionary or instance of InputTokensDetails [type=model_type, input_value=InputTokensDetails(prompt...ens=17, cached_tokens=0), input_type=InputTokensDetails]
    For further information visit https://errors.pydantic.dev/2.10/v/model_type

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 08:35:11 +01:00
Víctor Mayoral Vilches 82054a2e1c Fix docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 07:55:41 +01:00
Ali Waleed 382500d841
Add Langtrace to `tracing.md` (#371) 2025-03-27 21:33:49 -04:00
Víctor Mayoral Vilches 7b1d89db78 Advanced aligning agents but various missing bits:
- agents can't translate directly it seems, see current error
- in addition, it appears streaming mode leads to other problems

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-27 19:36:58 +01:00
Martin Jagusch b268829d08
Remove duplicate dependency definition of pynput (#367)
`pynput` is in the pyproject.toml file twice, as you can see on line 54.

The uv.lock file doesn't change.
2025-03-27 13:40:06 -04:00
amri369 377ddbace6
Hotfix mcp example (#365)
Small typo in uv command fixed
2025-03-27 13:05:30 -04:00
Víctor Mayoral Vilches a45f1fb22f Add blue team agent
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-27 15:14:35 +01:00
Víctor Mayoral Vilches 21d3f78ff5 Add tools, prompts and agents
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-27 15:06:12 +01:00
Víctor Mayoral Vilches 34a7bad920 Re-structure under sdk/agents, get CLI mockup
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-27 14:31:38 +01:00
Steven Heidel aad8accc86
Expose the "store" parameter through ModelSettings (#357)
Closes https://github.com/openai/openai-agents-python/issues/173

This will also set stored completions to True by default, encouraging a
best practice.
2025-03-26 19:01:28 -04:00
Rohan Mehta 4854a745e8
Raise error on more invalid function schemas (#356)
Towards #345

## Summary:
Using a `dict` or `Mapping` isn't strict-mode compliant. But we were
checking for the literal `True` whereas the value can also be an array,
for example. Fix that.

## Test Plan:

Unit tests
2025-03-26 15:52:19 -04:00
Rohan Mehta f99fa5f23c
Tracing screenshot for MCP docs (#355) 2025-03-26 10:56:34 -07:00
Víctor Mayoral Vilches 5e15abd4d7 Minor changes for alignment
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-26 18:55:21 +01:00
Rohan Mehta bd47a41d0b
MCP example for SSE (#354)
Simple example with a local SSE server.
2025-03-26 12:56:35 -04:00
Rohan Mehta 7f02967156
v0.0.7 (#353)
Upgrade version to prepare for a new release.
2025-03-26 09:06:24 -07:00
pakrym-oai 6d95a3f191
Mark handoff span as errored when multiple handoffs are requested (#344)
Also includes the set of requested agents in the error data.
<img width="968" alt="image"
src="https://github.com/user-attachments/assets/0c5c2e81-08f7-445c-bbb0-3e169ef744a5"
/>
2025-03-26 10:44:59 -04:00
Víctor Mayoral Vilches c64f35eda6 Update docs to integrate CAI, minor refinements
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-26 12:41:45 +01:00
Rohan Mehta 2261aabeeb
Adding Git MCP server example (#343)
- Adding new example showing a single agent interacting with local MCP
server for git
2025-03-25 19:54:59 -04:00
Rohan Mehta b5ba22904a
[5/n] MCP tracing (#342)
## Summary:

Adds tracing and tests for tracing.
- Tools are added to the agents
- Theres a span for the mcp tools lookup
- Functions have MCP data

## Test Plan:

Unit tests
.
2025-03-25 19:54:28 -04:00
Dmitry Pimenov 5385f8b10e added readme, fixed typo 2025-03-25 16:52:52 -07:00
Dmitry Pimenov 88c8acbc5a fixing lint issues 2025-03-25 16:34:00 -07:00
Dmitry Pimenov 0944390c3f adding Git MCP server example 2025-03-25 16:30:50 -07:00
Rohan Mehta 010022777b [5/n] MCP tracing
## Summary:

Adds tracing and tests for tracing.
- Tools are added to the agents
- Theres a span for the mcp tools lookup
- Functions have MCP data

## Test Plan:

Unit tests
.
2025-03-25 19:28:48 -04:00