Fireworks AI

The Fireworks AI component is an AI component that allows users to connect the AI models served on the Fireworks AI Platform. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component configuration is defined and maintained here.

#Setup

FieldField IDTypeNote
API Keyapi-keystringFill in your Fireworks AI API key. To find your keys, visit the Fireworks AI API Keys page.

#Supported Tasks

#Text Generation Chat

Provide text outputs in response to text inputs.

InputIDTypeDescription
Task ID (required)taskstringTASK_TEXT_GENERATION_CHAT
Model Name (required)modelstringThe OSS model to be used
Prompt (required)promptstringThe prompt text
System messagesystem-messagestringThe system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is set using a generic message as "You are a helpful assistant."
Prompt Imagesprompt-imagesarray[string]The prompt images (Note: According to Fireworks AI documentation on 2024-07-24, the total number of images included in a single API request should not exceed 30, and all the images should be smaller than 5MB in size)
Chat historychat-historyarray[object]Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. 'system', 'user' or 'assistant'", "content": "message content"}
SeedseedintegerThe seed
TemperaturetemperaturenumberThe temperature for sampling
Top Ktop-kintegerInteger to define the top tokens considered within the sample operation to create new text
Max new tokensmax-new-tokensintegerThe maximum number of tokens for model to generate
Top Ptop-pnumberFloat to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top-p (default=0.5)
OutputIDTypeDescription
TexttextstringModel Output
Usage (optional)usageobjectToken usage on the Fireworks AI platform text generation models

#Text Embeddings

Turn text into a vector of numbers that capture its meaning, unlocking use cases like semantic search.

InputIDTypeDescription
Task ID (required)taskstringTASK_TEXT_EMBEDDINGS
Model Name (required)modelstringThe OSS embedding model to be used
Text (required)textstringThe text
OutputIDTypeDescription
Embeddingembeddingarray[number]Embedding of the input text
Usage (optional)usageobjectToken usage on the Fireworks AI platform embedding models

#Example Recipes

Recipe for the Fireworks Chinese Content Writer pipeline.


version: v1beta
component:
fireworks-0:
type: fireworks-ai
task: TASK_TEXT_GENERATION_CHAT
input:
max-new-tokens: 200
model: qwen2-72b-instruct
prompt: ${variable.prompt}
system-message: You are a expert social media content writing assistant. Output the result in chinese for 小紅書.
temperature: 0.05
top-k: 10
top-p: 0.5
setup:
api-key: ${secret.INSTILL_SECRET}
variable:
prompt:
title: prompt
description: input prompt i.e. "寫一份生椰拿鐵文案", "write about horses"
instill-format: string
output:
output:
title: output
value: ${fireworks-0.output.text}