Context-sensitive technology program
The genspark2api binds models to conversations by default, but the following operational details should be noted:
- Session ID Passing: in
/chat/completionsThe request adds theconversation_idFields (automatically generated if not provided) - Message History Maintenance: Each request needs to contain the full
messagesArray (with records of previous conversations) - Model Lock: Set on non-streaming requests
"fixed_model": trueParameter disable auto switching - timeout control: Configuration
keep_aliveParameter (in seconds) extends session hold time
Example of a full request:{
"model": "gpt-4o",
"conversation_id": "uuid123",
"messages": [
{"role": "user", "content": "上一轮问题"},
{"role": "assistant", "content": "上一轮回答"},
{"role": "user", "content": "新问题"}
],
"fixed_model": true
}
This answer comes from the articleGenspark2api (failed)The































