Straico Official icon

Straico Official

Get data from Straico API

Agent → Prompt Completion

AI-generated

Overview

The node sends a prompt to a specified Straico AI agent to get a completion response. It supports configuring search parameters such as search type, number of results (k), fetch count (fetch_k), lambda multiplier, and score threshold to customize how the agent processes the prompt. The node can also simplify the response if requested. This is useful for scenarios where users want to interact with AI agents for generating text completions based on custom prompts, such as chatbots, virtual assistants, or automated content generation.

Use Case Examples

  1. Sending a customer query prompt to an AI agent to get a helpful response.
  2. Using an AI agent to generate creative text completions for marketing content.
  3. Querying an AI agent with specific search parameters to retrieve relevant information from its knowledge base.

Properties

Name Meaning
Agent ID The unique identifier of the AI agent to which the prompt is sent.
Prompt The text prompt to send to the AI agent for completion.
Search Type The method used to search or retrieve relevant information for the prompt. Options include similarity, mmr, and similarity_score_threshold.
K The number of top results to consider in the search.
Fetch_k The number of results to fetch initially before filtering.
Lambda_mult A multiplier parameter used in the search algorithm to balance relevance and diversity.
Score_threshold The minimum score threshold for results to be considered relevant.

Output

JSON

  • id - The unique identifier of the prompt completion response.
  • message - The text message generated by the AI agent in response to the prompt.
  • model - The AI model used to generate the completion.
  • usage - Information about token usage or resource consumption for the completion.
  • created_at - Timestamp when the completion was created.

Dependencies

  • Straico API with an API key credential

Troubleshooting

  • Ensure the Agent ID is correct and the agent exists in the Straico system.
  • Verify that the prompt text is not empty and is properly formatted.
  • Check API authentication credentials to ensure they are valid and have necessary permissions.
  • If the response is empty or unexpected, try adjusting search parameters like K, fetch_k, lambda_mult, and score_threshold for better results.
  • Review error messages returned by the API for specific issues such as rate limits or invalid parameters.

Discussion