Skip to main content

Text Chat

TOX name base_txt_to_chat

Summary

A TouchDesigner component for generating synthetic text with the Google Gemini API based on a chat style exchange. The first input to the Component is used as the input text for the model. The second input can be used to provide a chat history, or context, when interacting with the model.

Controls

Refer to the Common Controls for a list of all available parameters.

Parameter NameParameterTypeDescription
Clear LengthChatlengthintThe number length of the chat history
Clear Chat HistoryClearchathistorypulseClears the chat history

Outputs

Output IndexNameTypeDescription
0out_chatDATContains the response back from the Google Gemini API as a series of rows that contain both the user and model exchange
1out_chat_as_blockDATA single text block formatted as a chat history
2out_metadataDATContains the metadata back from the Google Gemini API, this includes data like total token count, and prompt token count