Skip to content

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)

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