feat: add resp format, model, prompt cache, usage metrics to conversation api#9241
Conversation
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
|
ignore this please as I am WIP splitting this into different PRs |
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
| // The model used for the conversation. | ||
| optional string model = 2; |
There was a problem hiding this comment.
Should this not be at the ConversationResponseAlpha2 level?
There was a problem hiding this comment.
i matched openai to sit alongside choices https://github.com/openai/openai-go/blob/main/chatcompletion.go#L172-L176
| // Set of 16 key-value pairs that can be attached to the conversation. | ||
| // This can be useful for storing additional information about the object in a structured format, | ||
| // and querying for objects via API or the dashboard. | ||
| // Keys are strings with a maximum length of 64 characters. | ||
| // Values are strings with a maximum length of 512 characters. | ||
|
|
||
| // TODO: decide because this is a design decision that I need input on. | ||
| // Langchain that we use keeps this as map[string]any, but openai uses map[string]string, so which to go with? |
There was a problem hiding this comment.
I need thoughts here. Here's more context:
https://discord.com/channels/778680217417809931/1458150585063837757/1458550168579215382
There was a problem hiding this comment.
NOTE: I can leave this alone for now and circle back to this decision but keeping for now at least for discussion here.
| // The model used for the conversation. | ||
| optional string model = 2; |
There was a problem hiding this comment.
i matched openai to sit alongside choices https://github.com/openai/openai-go/blob/main/chatcompletion.go#L172-L176
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
|
Merged the prompt cache and usage metrics PR from #9265 |
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
|
ready for review pls :) |
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
…into feat-convo-api-more-fields
Signed-off-by: Samantha Coyle <[email protected]>
Description
This PR reviews the fields in the Conversation API from a Dapr Agents perspective, evaluates which ones we actually need, and aligns our API more closely with OpenAI’s where it makes sense (ie adding fields/commenting on ones we can add in future). Specifically, I’ve:
Still TODO:
Update integration tests to reflect these changes.Open contrib PR bubbling these fields over to the LLM providers and fully test out these fields for the different conversation componentsI will likely open a separate PR or just add in usage metrics fields too on the responseOpening to get early feedback on the changes.
Issue reference
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: