FM BetterForms
BF Editorfmbetterforms.com
Engineering Reference Docs
Engineering Reference Docs
  • BF Streaming Proxy
  • Updating the Helper File
  • Connection Trouble Shooting Guide
  • Software Testing - Overview
    • Types of Testing
    • UX/UI Checklist
      • Pages
        • Login 🔑
        • Pricing 💵
        • 404 🤷‍♂️
        • Contact Us ☎️
        • Sign Up 👋
        • FAQ ❓
        • Blog Post 🗞
        • Careers 💼
        • Team 👫
        • Cart 🛒
        • Press 📸
        • Search results 🔍
      • Elements
        • Avatar 😁
        • Badge 📛
        • Button 🖲️
        • Card 🃏
        • Table 📏
        • Icon 🌠
        • Text Field ⌨️
        • Toggle 🎛️
        • Loading ⏳
        • Modal 🎉
        • Tooltip 🛠
        • Search 🕵️‍♀️
        • Navigation 🧭
        • Radio 📻
        • Checkbox ☑️
        • Tabs 🗂
        • Toast 🍞
      • Flows
        • Submitting a form 📨
        • Making a payment 💳
        • Contacting support 🆘
        • Deleting account 🗑
        • Tracking progress 📈
        • Resetting password 🤫
        • Showing input error 🚨
        • Entering a promo code 🏷️
        • Saving changes 💾
        • Canceling subscription 🛑
      • Topics
        • Responsiveness 🎚
        • Typography 🔤
        • Dark mode 🌑
        • Accessibility 🚹
        • Colors 🎨
        • UX Writing ✏️
      • Brand
        • Logo 💠
        • Social Media 🔉
        • Typography 🔠
    • FM BetterForms - Quality Assurance
    • JavaScript Libraries
  • Rollbacks and Version Control
  • BF Server Proxy
  • Base code End of Life - 0.8.78-0.8111
  • Setting up Auth0
    • Introduction
    • Getting started
      • Creating a tenant
      • Creating Application
      • Additional customizations
        • Allowed Callback URLs
    • Creating a Database
      • Choosing different login options
        • Social Connections
        • Username and password (Auth0)
        • Creating new BF Users
        • Using Auth0 in an iFrame
        • Configuring FM BetterForms
        • Additional Notes
  • Create an S3 Bucket on AWS
  • ApexCharts - Getting started
  • BF Enterprise Documentation
    • Overview
      • Features
      • Overview Diagram
    • Requirements
    • Env File
    • Setting up the Server
      • Installation
      • Loading image to a local repository
      • Starting server
      • Restarting Policies
      • Scaling up
    • Hardware Recommendations
    • FM Credentials - Helper file
    • How it works
      • Development
      • Downloading environment data
  • BetterForms Error Pages API
    • Introduction
    • Dynamic Error Page
    • Static Error Page
    • Custom error pages
    • Custom error handlers
    • Error Code List
  • BF Streaming API
  • Creating a PWA
    • Introduction
    • Getting Started
      • Making it installable
      • Browser Support
      • Sending Push Notifications
      • Sending a Push Notification from the API Endpoint
      • Adding DOM Header Insertion to be Available for Offline Use
Powered by GitBook
On this page

Was this helpful?

BF Streaming API

The BetterForms Streaming API allows real time streaming of responses from LLM services like OpenAI To be initiated.

Overview

Creating a call to this service will create a post to the LLM and stream results back to the appropriate channel. This service is in beta release as of the time of this document.

Avail in bf-staging only

//create endpoint
portal.myapp.com/stream/create

Method: POST
Key
Type
Description

apiKey

string

Unique API key for BF (find in app settings)

channels

array

Array of BF Messaging communication channels

actionName

string

Name of the action to be performed

service

string

Name of the service to be used (OpenAI)

payload

object

Object containing parameters for the action, this contains params that are passed on to the streaming service

payload.apiKey

string

Unique API key for the streaming service

payload.stream

bool

Indicator if streaming is enabled, if disabled, result is returned directly to the POST result

payload.functions

array

Array of functions to be executed

payload.max_tokens

number

Maximum number of tokens for the response

payload.seed

number

Seed for the random number generator

payload.messages

array

Array of messages to be processed

payload.model

string

Model to be used for processing

payload.temperature

number

Parameter controlling randomness in output

{
  "apiKey": "BFAPI_xxxxxxxx-xxxxxx-xxxxxx,
  "channels": [
    "anonymous"
  ],
  "actionName": "assistantReceiveResultsStream",
  "service": "openAI",
  "payload": {
    "apiKey": "sk-xxxxxxx-xxxxxxxx-xxxxxxx",
    "stream": true,
    "functions": [],
    "max_tokens": 4000,
    "seed": 1,
    "messages": [
      {
        "content": "You are a Chuck Norris Joke teller.",
        "role": "system"
      },
      {
        "content": "create a joke about software developers",
        "role": "user"
      }
    ],
    "model": "gpt-4-turbo-preview",
    "temperature": 0
  }
}
PreviousError Code ListNextCreating a PWA

Last updated 10 months ago

Was this helpful?