Skip to main content

OPENAI_THREAD_MESSAGE

Send a message to a thread/assistant. The assistant and thread inputs are required. The message can be provided via cfg.instruction or via default text input. The assistant response text is stored in the default text output.

At a glance

  • Category LLM
  • Version: 1.0.9
  • Applications: all
  • Scope: all
  • Default Service: OPENAI_COMPLETION

Config Options

NameDescriptionDefaultRequiredResolvedConstraintsConditional Rules
instructionOptional message instruction; if omitted the default text input is used.NonefalsetrueNoneNone

Inputs

TypeDescriptionDefaultRequiredResolved
assistantAssistant object or id used to send the messageNonetruefalse
threadThread object or id to send the message toNonetruefalse
textMessage text to send to the assistant. If omitted, reads from cfg.instruction or default text input.Nonefalsefalse

Outputs

TypeDescriptionOptional
textAssistant response text (default text output)false

Examples

Send a message to a thread

- step: OPENAI_ASSISTANT # load assistant
assistantId: asst_Ja0fm2Rova2QJGbKrAKrtXXX
- step: OPENAI_THREAD # load an existing thread
reuse: true
storeIn: session
- step: OPENAI_THREAD_MESSAGE
instruction: |
Create a list of the key takeaways from the documents provided.

See Also

General Resources: