Documentation
DocumentationLLM Request

LLM Request

Make calls to a Large Language Model depending upon user's configuration. Currently we support Gemini Pro 1.0.

PromptQueryStep

PromptQueryStep is a step that performs a message request to the model with a customized prompt.

class PromptQueryStep extends Step {
  PromptQueryStep({required this.prompt, required this.promptOutput});
 
  final String prompt;
  final PromptOutput promptOutput;
}
  • prompt: A string-interpolated prompt with a mix of inputs and outputs.
  • promptOutput: Stores the response received from the message request. It can be appended to the chat or used in other steps.

Example usage:

final promptOutput = PromptOutput();
return [
  PromptQueryStep(
    prompt: '''You are an X agent. Here is the $userQuery, here is the $codeAttachment $matchingCode and the document references: $matchingDocuments. 
    
    Answer the user's query.''',
    promptOutput: promptOutput,
  ),
  // Next: Append the `promptOutput` to chat or use it in other steps
];