BF Streaming API (Chat)
Overview
Key
Type
Description
{
"apiKey": "BFAPI_xxxxxxxx-xxxxxx-xxxxxx",
"channels": [
"anonymous"
],
"actionName": "assistantReceiveResultsStream",
"payload": {
"provider": "openai", // or "gemini"
"apiKey": "sk-xxxxxxx-xxxxxxxx-xxxxxxx", // Your OpenAI or Gemini API Key
"stream": true,
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system" // For Gemini, 'system' role might need to be adapted or handled as part of 'history'
},
{
"content": "Tell me a fun fact about space.",
"role": "user"
}
],
"model": "gpt-4-turbo-preview", // or a Gemini model like "gemini-pro"
// "generationConfig": { // Example for Gemini
// "temperature": 0.7,
// "maxOutputTokens": 2048
// }
}
}Last updated
Was this helpful?