Commit Graph

38 Commits

Author SHA1 Message Date
Rohan Mehta 9e9ad165ab Read tracing API data lazily 2025-03-21 15:32:37 -04:00
Alex Hall e16c38a6e3 More fetch_normalized_spans 2025-03-21 18:31:06 +02:00
Alex Hall b7df4e470e empty assertions 2025-03-21 18:26:04 +02:00
Alex Hall 99d6bc5199 More fetch_normalized_spans 2025-03-21 18:15:52 +02:00
Alex Hall 0d0f35787f More fetch_normalized_spans 2025-03-21 18:14:59 +02:00
Alex Hall b1cfcfd18b More fetch_normalized_spans 2025-03-21 18:13:04 +02:00
Alex Hall 5cea0dffc6 More fetch_normalized_spans 2025-03-21 18:09:19 +02:00
Alex Hall e9611e22ca Merge branch 'main' of github.com:openai/openai-agents-python into alex/cleanup-tests 2025-03-21 10:13:33 +02:00
Rohan Mehta ec66b71419 update tests 2025-03-20 13:08:38 -04:00
Dominik Kundel f476521c53 fix tests 2025-03-20 09:52:15 -07:00
Dominik Kundel 20f0793862 feat: add voice pipeline support
> Co-authored-by: rm@openai.com
2025-03-20 09:43:13 -07:00
Alex Hall da4122975c lint 2025-03-20 13:56:11 +02:00
Alex Hall 8ff2f3a72c Remove redundant weaker tracing assertions 2025-03-20 13:49:38 +02:00
Rohan Mehta c91db09d3c Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
Rohan Mehta 8b643537a0 Update tests and docs for strict mode decorator (#205)
As titled. Test plan: unit tests/docs.
2025-03-18 21:35:00 -04:00
Alex Hall 09279d164e mypy 2025-03-17 23:56:42 +02:00
Alex Hall 3ff9238dae Merge branch 'main' of github.com:openai/openai-agents-python into alex/inline-snapshot 2025-03-17 23:55:56 +02:00
Rohan Mehta 8d14695f51 Update tests and docs for strict mode decorator 2025-03-17 15:06:57 -04:00
Rohan Mehta 417cdc5efe Pretty print result classes 2025-03-17 11:11:39 -04:00
Rohan Mehta 4719471cc3 utils directory 2025-03-16 18:48:45 -04:00
Rohan Mehta d60a413c14 feat: Add strict_mode option to function_schema and function_tool (#60)
This PR introduces a `strict_mode: bool = True` option to
`@function_tool`, allowing optional parameters when set to False. This
change enables more flexibility while maintaining strict JSON schema
validation by default.

resolves #43 

## Changes:

- Added `strict_mode` parameter to `@function_tool` and passed it to
`function_schema` and `FunctionTool`.
- Updated `function_schema.py` to respect `strict_mode` and allow
optional parameters when set to False.
- Added unit tests to verify optional parameters work correctly,
including multiple optional params with different types.

## Tests:

- Verified function calls with missing optional parameters behave as
expected.
- Added async tests to validate behavior under different configurations.
2025-03-16 17:43:46 -04:00
Alex Hall 8722f91a59 Merge branch 'main' of github.com:openai/openai-agents-python into alex/inline-snapshot 2025-03-14 14:16:34 +02:00
Rohan Mehta a9f717b220 Fix streaming in chat completions 2025-03-12 17:17:07 -07:00
Muhammad Junaid fafeeac958 refactor: update formatting in test_assistant_messages_in_history
- Enhanced the readability of the test case by reformatting the expected output and input message structures.
- This change maintains the same functionality while making the test code cleaner and easier to understand.
2025-03-13 00:20:59 +05:00
Muhammad Junaid b5bbc060d3 fix: support assistant role in message conversion
- The _Converter.items_to_messages method was incorrectly rejecting 'assistant'
as a valid role in conversation messages, causing runtime errors when processing
standard chat completion message formats.
- This fix enables proper handling of
complete conversation contexts that include both user and assistant messages.
2025-03-12 21:10:03 +05:00
Jai0401 644d8afa1b fix: resolve linting issues 2025-03-12 16:00:20 +05:30
Alex Hall a596b2dc0f Merge branch 'main' of github.com:openai/openai-agents-python into alex/inline-snapshot 2025-03-12 11:01:00 +02:00
Jai0401 ef74c7b8e7 feat: Add strict mode option to function_schema and function_tool 2025-03-12 11:45:32 +05:30
Rohan Mehta c7058adab0 pin to openai 1.66.2, update tests 2025-03-11 15:26:06 -07:00
Alex Hall 27c8521df3 Merge branch 'main' of github.com:openai/openai-agents-python into alex/inline-snapshot 2025-03-12 00:25:21 +02:00
Rohan Mehta 001fb19c79 make format 2025-03-11 14:54:10 -07:00
Alex Hall 9ebc575631 Stronger tracing tests with inline-snapshot 2025-03-11 22:57:14 +02:00
Alex Hall da0b78d533 Run make format 2025-03-11 22:53:48 +02:00
Rohan Mehta e2bda4ddc9 Remove duplicated files in tests 2025-03-11 13:12:32 -07:00
Rohan Mehta 440ea7167f a few more 2025-03-11 11:27:01 -07:00
Rohan Mehta e8140b26ae more pycache 2025-03-11 11:25:30 -07:00
Rohan Mehta 1eb48e3857 update cua model 2025-03-11 11:22:37 -07:00
Rohan Mehta aaec57a426 Initial commit 2025-03-11 09:42:28 -07:00