Commit Graph

371 Commits

Author SHA1 Message Date
Mery-Sanz 58985f9d57 fix mcp test 2025-04-11 08:24:26 +02:00
Mery-Sanz 99469a17e2 fix function schema test 2025-04-11 08:11:26 +02:00
Mery-Sanz f07059cbd5 fix some test 2025-04-11 08:04:19 +02:00
Mery-Sanz 7e3af1842a add coments and docstring 2025-04-10 09:57:35 +02:00
Mery-Sanz 2a32bd9e9b improve test 2025-04-10 09:42:16 +02:00
Mery-Sanz 75869265a5 add more test 2025-04-10 09:27:56 +02:00
Mery-Sanz 9532fe42f5 add new test and fix previous 2025-04-10 08:54:21 +02:00
Mery-Sanz 777ddaedd9 modify gitingore 2025-04-10 07:59:39 +02:00
Mery-Sanz 8a2778769d add test 2025-04-10 07:58:40 +02:00
Mery-Sanz 8aa1ae0424 final fix 2025-04-09 16:17:06 +02:00
Mery-Sanz 73de470fb0 fix more test 2025-04-09 16:07:58 +02:00
Mery-Sanz c083ecf69f fix more test 2025-04-09 15:59:24 +02:00
Mery-Sanz f88365b11d add 2 more test 2025-04-09 15:54:58 +02:00
Mery-Sanz 05fab61056 fix test_agent_runner 2025-04-09 15:51:05 +02:00
Mery-Sanz 4ae76ecd29 fix test_agent_hooks.py and reorganize imports 2025-04-09 15:46:53 +02:00
María Sanz Gómez ef64c7a1e4 fix tests/test_agent_config.py 2025-04-09 15:42:26 +02:00
Víctor Mayoral Vilches e8e05e9e5a 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 b2233b76d1 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 5b29fbe4db 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 0877dfda81 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 7cda5445a4 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 69abd9e1d1 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 d1fd6623e5 Merge remote-tracking branch 'origin/main' into cai 2025-03-31 13:21:34 +02:00
Eric Peter e891dfc314 Databricks MLflow tracing integration (#401) 2025-03-30 23:53:09 -04:00
Víctor Mayoral Vilches aef3f5e73c 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 cff20480b7 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 944128583c 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 f0b93aec91 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 d2d2ce535d 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 f18e659ec8 Fix docs
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-03-28 07:55:41 +01:00
Ali Waleed 4c40fec70f Add Langtrace to `tracing.md` (#371) 2025-03-27 21:33:49 -04:00
Víctor Mayoral Vilches 1a22013bda 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 a7a814d30d 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 1683606b6f Hotfix mcp example (#365)
Small typo in uv command fixed
2025-03-27 13:05:30 -04:00
Víctor Mayoral Vilches 326c3274fc 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 887c2fb319 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 ac4797cec6 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 d1e94324e8 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 5ff0baddc3 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 1c8e9a55db Tracing screenshot for MCP docs (#355) 2025-03-26 10:56:34 -07:00
Víctor Mayoral Vilches 21048444c6 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 aeda40c10f MCP example for SSE (#354)
Simple example with a local SSE server.
2025-03-26 12:56:35 -04:00
Rohan Mehta fe42548cce v0.0.7 (#353)
Upgrade version to prepare for a new release.
2025-03-26 09:06:24 -07:00
pakrym-oai 0fa5849839 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 adb358baae 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 013d8ae9d2 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 b870b90471 [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 d53411ba6a added readme, fixed typo 2025-03-25 16:52:52 -07:00
Dmitry Pimenov 3587502c69 fixing lint issues 2025-03-25 16:34:00 -07:00
Dmitry Pimenov 788b4faba6 adding Git MCP server example 2025-03-25 16:30:50 -07:00