Martín Bravo
f4edc1f372
style: improve string formatting in visualization functions
2025-03-18 10:15:41 +01:00
Martín Bravo
b7627cb642
style: improve string formatting
2025-03-18 10:14:52 +01:00
Martín Bravo
0079bca717
style: improve code formatting and readability in visualization functions
2025-03-18 10:09:44 +01:00
Martín Bravo
53367be893
feat: add visualization module for agent graphs using Graphviz
2025-03-18 09:55:30 +01:00
Martín Bravo
f7c594da08
feat: add visualization functions for agent graphs
2025-03-18 09:53:48 +01:00
Martín Bravo
aff1d60ea1
Merge branch 'main' of https://github.com/openai/openai-agents-python into feat/draw_graph
2025-03-17 23:50:52 +01:00
Rohan Mehta
d0a7b00086
Fix typo on Agent documentation ( #151 )
...
Argument name is not description but handoff_description
2025-03-17 16:51:47 -04:00
Carlos Souza
64150c8aea
Fix lint
2025-03-17 16:14:28 -04:00
Rohan Mehta
0989cd9184
Add TracingProcessor export to __init__.py ( #192 )
...
# Summary
This adds the missing TracingProcessor export to __init__.py.
# Behavior
When trying to add a custom tracing processor, the TracingProcessor
importing fails with not found error when trying the example usage
proposed in issue #164
Specifically this line throws the error:
`add_trace_processor(MyTracingProcessor("output"))`
# Expected Behavior
Inspecting the init file, simply the import/export was missing. Adding
these made the example code work for me
# Test plan
Local dev of example code in #164
# Issue number
#164
# Checks
None
2025-03-17 15:39:04 -04:00
Rohan Mehta
64e263b614
Pretty print result classes
2025-03-17 11:11:39 -04:00
Vincenzo Domina
1f58528f1c
Add TracingProcessor export to __init__.py
2025-03-17 10:37:43 +01:00
MartinEBravo
e984274da1
Merge branch 'main' of https://github.com/openai/openai-agents-python into feat/draw_graph
2025-03-17 10:17:36 +01:00
Rohan Mehta
09d70c074d
utils directory
2025-03-16 18:48:45 -04:00
Rohan Mehta
951193bd21
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
Carlos Souza
26828e5e68
Fix typo on Agent documentation
...
Argument name is not description but handoff_description
2025-03-13 16:18:40 -04:00
Rohan Mehta
7f68a7da2a
Consolidate to one logger ( #149 )
...
Results in double logging if we dont. Closes #141 .
2025-03-13 11:38:18 -07:00
Rohan Mehta
17f0a425ba
Consolidate to one logger
2025-03-13 13:55:15 -04:00
Martín Bravo
29e9983ae8
Linting
2025-03-13 18:49:12 +01:00
Martín Bravo
cecdcd0af4
Add visualization functions for agents using Graphviz
2025-03-13 18:33:12 +01:00
Rohan Mehta
4db24bdb3c
Update tracing docs to be correct
2025-03-13 13:20:27 -04:00
Rohan Mehta
16cfce117c
Add examples and documentation for using custom model providers ( #110 )
2025-03-13 08:17:25 -07:00
Rohan Mehta
341198ff92
Add request ID
2025-03-12 18:07:59 -07:00
Rohan Mehta
25a633139d
Add examples and documentation for using custom model providers
2025-03-12 17:34:38 -07:00
Rohan Mehta
2302b478af
Fix streaming in chat completions
2025-03-12 17:17:07 -07:00
Rohan Mehta
18b10f1371
Merge pull request #105 from openai/pr105
...
Add max_tokens and documentation to model settings
2025-03-12 13:45:21 -07:00
Rohan Mehta
fde49cfcf7
Add max_tokens and documentation to model settings
2025-03-12 13:35:10 -07:00
Rohan Mehta
f461bea2ce
Merge pull request #89 from eltociear/patch-1
...
chore: update guardrail.py
2025-03-12 13:30:56 -07:00
Rohan Mehta
f2617595c6
Remove duplicated code
2025-03-12 13:08:00 -07:00
Muhammad Junaid
51d79bf141
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
Ikko Eltociear Ashimine
77e359c0c7
chore: update guardrail.py
...
minor fix
2025-03-12 22:45:17 +09:00
Jai0401
0c33a24d8f
fix: resolve linting issues
2025-03-12 16:00:20 +05:30
Jaimin Godhani
a81da6788d
Update src/agents/tool.py
...
Co-authored-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
2025-03-12 14:56:19 +05:30
Jai0401
b7e7fdee55
feat: Add strict mode option to function_schema and function_tool
2025-03-12 11:45:32 +05:30
Rohan Mehta
be1c9495d6
Merge pull request #52 from sunrabbit123/patch-1
...
Fix: remove unreached code in tool.py
2025-03-11 22:09:07 -07:00
Rohan Mehta
90010a7eb5
Merge pull request #55 from the-praxs/fix/traces-spans-data
...
fix: count `spans` and `traces` correctly
2025-03-11 22:05:46 -07:00
Pratyush Shukla
e5917724dc
resort to show total number of spans and traces
2025-03-12 10:20:15 +05:30
Pratyush Shukla
6962410976
Revert "count both spans and traces"
...
This reverts commit d49bd89061 .
2025-03-12 10:19:14 +05:30
Pratyush Shukla
d49bd89061
count both spans and traces
2025-03-12 10:14:01 +05:30
오병진
51a5be0212
Update tool.py
2025-03-12 13:13:48 +09:00
hironow
9b118a10c6
Merge branch 'main' into hironow/chore-doc-type
...
# Conflicts:
# tests/docs/config.md
# tests/docs/guardrails.md
# tests/docs/tracing.md
2025-03-12 10:13:25 +09:00
hironow
c827ecb788
Merge branch 'main' into hironow/chore-doc-type
2025-03-12 10:11:38 +09:00
Rohan Mehta
c27d7b7d24
pin to openai 1.66.2, update tests
2025-03-11 15:26:06 -07:00
Rohan Mehta
ce66d908a9
make format
2025-03-11 14:54:10 -07:00
dmitry-openai
9946b8b58d
Merge pull request #8 from openai/repo/gitignore
...
removing ds store, adding gitignore
2025-03-11 11:17:37 -07:00
hironow
5a33e9b168
chore: fix type in doc and comment
2025-03-12 02:46:36 +09:00
Rohan Mehta
aaec57a426
Initial commit
2025-03-11 09:42:28 -07:00