Skip to content

add overwrite mechanism for stream_options #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

Ddper
Copy link
Contributor

@Ddper Ddper commented Apr 10, 2025

fix issue #442

below is an example to overwrite include_usage

    result = Runner.run_streamed(
        agent,
        "Write a haiku about recursion in programming.",
        run_config=RunConfig(
            model_provider=CUSTOM_MODEL_PROVIDER,
            model_settings=ModelSettings(include_usage=True)
        ),
    )

@Ddper Ddper force-pushed the overwrite-mechanism-for-stream-options branch from 12ac796 to 4197582 Compare April 10, 2025 03:01
@rm-openai rm-openai merged commit 8ded8a9 into openai:main Apr 10, 2025
5 checks passed
Lightblues pushed a commit to Lightblues/openai-agents-python that referenced this pull request Apr 13, 2025
fix issue openai#442

below is an example to overwrite include_usage


```
    result = Runner.run_streamed(
        agent,
        "Write a haiku about recursion in programming.",
        run_config=RunConfig(
            model_provider=CUSTOM_MODEL_PROVIDER,
            model_settings=ModelSettings(include_usage=True)
        ),
    )
```
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