Open
Description
Service
OpenAI
Describe the bug
Hi! Could you help me with the problem.
Smth wrong with serialization:
It sends request with wrong session's json
instead of using ConversationFunctionTool it uses base class ConversationTool
the session:
the serialized session:
{
"session": {
"instructions": "*hidden*",
"voice": "alloy",
"input_audio_format": "pcm16",
"output_audio_format": "pcm16",
"input_audio_transcription": {
"model": "whisper-1"
},
"tools": [
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
},
{
"type": "function"
}
],
"tool_choice": "auto"
},
"type": "session.update"
}
the following changes in ConversationSessionOptions.Serialization.cs fix the problem:
Steps to reproduce
- Need to create maui android project
- Create a session with Tools and Functions
- Configure the session
- it should send a corrected json
Code snippets
No response
OS
Android
.NET version
net8.0-android
Library version
2.1.0-beta.2