Skip to content

Conversation

@ShivangiReja
Copy link
Collaborator

This PR adds support for the latest Response properties:

  • max_tool_calls
  • safety_identifier
  • top_logprobs
  • conversation

/** The conversation that this response belongs to.
* Items from this conversation are prepended to input_items for this response request.
* Input items and output items from this response are automatically added to this conversation after this response completes. */
conversation?: ConversationParam | null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This property also needs to be added to the Response output model below.

There is an interesting situation here though:

  • In the API reference docs, this property is an object with a single "id" property (just like we saw in the input).
  • However, in the latest spec, this property is defined as an object with the "id" property, but with a few other properties too, like "metadata", "created_at", etc.

So now, the question is: Which one is correct?

To find the answer, could you verify by testing against the service and seeing what it returns? Based on what you find, I see two paths:

  1. If it returns just the "id" property, we can expose this property as a single string property called ConversationId exactly like you did in the input model. Additionally, we should also file a bug against the latest spec.
  2. But if it returns more than that just the "id", then we might need to expose a full Conversation object with all the other properties.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tested this and the conversation object in the response only contains the id field, none of the additional properties from the latest spec show up.

I’ve updated the Response output model accordingly and created an issue https://github.com/microsoft/openai-openapi-pr/issues/283 for the spec mismatch.

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