Skip to content

Add metadata to ModelSettings #431

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 3, 2025
Merged

Conversation

drewy-openai
Copy link
Contributor

Allows metadata to be supplied to the responses.create call. This can, for example, be used to connect response logs to traces groups by passing the group_id.

@drewy-openai drewy-openai requested a review from rm-openai April 3, 2025 20:21
@rm-openai rm-openai merged commit 0110f3a into main Apr 3, 2025
5 checks passed
@rm-openai rm-openai deleted the drewy/forward-responses-metadata branch April 3, 2025 21:50
@@ -537,6 +537,7 @@ async def _fetch_response(
stream_options={"include_usage": True} if stream else NOT_GIVEN,
store=store,
extra_headers=_HEADERS,
metadata=model_settings.metadata,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be metadata=self._non_null_or_not_given(model_settings.metadata)

@@ -247,6 +247,7 @@ async def _fetch_response(
extra_headers=_HEADERS,
text=response_format,
store=self._non_null_or_not_given(model_settings.store),
metadata=model_settings.metadata,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be metadata=self._non_null_or_not_given(model_settings.metadata)

Lightblues pushed a commit to Lightblues/openai-agents-python that referenced this pull request Apr 13, 2025
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.

3 participants