openai: allow for content _and_ tool calls in the same message
Previously our OpenAI chat completions compat layer assumed that tool
calls and content would never be provided together, but this is not a
correct assumption. Content is only optional when tool calls are
present, but tool calls and content can be provided together
Fixes: https://github.com/ollama/ollama/issues/11704
{"role":"user","content":"What's the weather like in Paris Today?"},
{"role":"assistant","content":"Let's see what the weather is like in Paris","tool_calls":[{"id":"id","type":"function","function":{"name":"get_current_weather","arguments":"{\"location\": \"Paris, France\", \"format\": \"celsius\"}"}}]}
]
}`,
req:api.ChatRequest{
Model:"test-model",
Messages:[]api.Message{
{
Role:"user",
Content:"What's the weather like in Paris Today?",
},
{
Role:"assistant",
Content:"Let's see what the weather is like in Paris",