DeepInfra Querying Function
Guide:
Input Variables
License - Your FlowBridge Custom Function license key
Model - The DeepInfra model that is OpenAI compatible
Api Key - The API key for your DeepInfra account
System Prompt - The system prompt you want to include (You can set this to "manual" and change the prompt in the code)
User Prompt - The user prompt you want to include, generally your {last_utterence} variable (You can set this to "manual" and change the prompt in the code)
Max Tokens - The maximum tokens you want the model to use
Step by Step guide
Here is the URL for the official support page showcasing the steps visually: https://support.flowbridge.app/hc/en-us/articles/19033382413714-DeepInfra-Querying-Use-cheaper-open-source-models
Navigate to the FlowBridge admin panel
Click "Custom Functions"

Click "Download" on DeepInfra Querying function

Go to your Voiceflow Project
Click "Functions"

Click this icon to import the function code

Click "Browse"

Click "Import" after selecting the downloaded JSON file

Click "Workflows"

Double-click here.

Click "Capture" and drag it in to the project

Click here to connect the Start block and Capture block

Click "Function" and drag it in to the project

Click here to connect the capture block and function block

Click on the function block and click on "Select existing function"

Click "DeepInfra Querying (OpenAI Standard)"

Go to the FlowBridge custom function page and copy your license
Paste the license code here

Click here.

Write the number of maximum tokens you want the LLM to use
Click here.

In a new tab, navigate to https://deepinfra.com/
Click "Models"

Click this icon which will copy the chosen LLM model you want to use (Make sure its a OpenAI compatible model).

Paste the model here

Go back to DeepInfra, if you do not have an account yet, create one. If you do, click "Dashboard"

Click "API Keys"

Click "New API key"

Click the "API Key name" field.

Type what you want to label this API key
Click "Generate API key"

Click this icon to copy the API key.

Paste the API key here

Click here.

Type you're system prompt, like "Be a pirate"
Click here.

Type "Say hello to me" or use the {last_utterence} variable to use the message from the user
Click here.

Type "{"
Click "Create variable"

Click the "Name" field.

Type "deepinfra_response"
Click "Create variable"

Click here and drag a line somewhere

Click "Text"

Click here.

Type "{deepinfra_response}" to show the response from the LLM to the user
Last updated