Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

ExternalGenerator

Call an external service with a prompt and return its response.

Key Features

  • Sends a prompt to an external HTTP service and returns the results.
  • Works as a drop-in replacement for LLM generators when using external services.
  • Flexible regarding what constitutes a prompt — supports use cases like SQL queries sent to external databases.
  • Passes optional metadata alongside the prompt to the external service.
  • Configures a custom timeout for requests.

Configuration

  1. Drag the ExternalGenerator component onto the canvas from the Component Library.
  2. Click the component to open the configuration panel.
  3. On the General tab:
    1. Enter the url of the external service.
  4. Go to the Advanced tab to configure request headers and timeout.

Connections

ExternalGenerator accepts a prompt string and optional meta dictionary as input. It outputs a list of reply strings (replies) and a list of metadata dictionaries (meta).

Connect PromptBuilder to the prompt input to provide formatted instructions. Connect the replies output to DeepsetAnswerBuilder to build GeneratedAnswer objects.

Parameters

Inputs

ParameterTypeDefaultDescription
promptstrThe prompt to pass to the service.
metaOptional[Dict]NoneAdditional metadata related to the prompt.

Outputs

ParameterTypeDefaultDescription
repliesList[str]The answers from the service.
metaList[Dict[str, Any]]Metadata related to the answers.

Init Parameters

These are the parameters you can configure in Pipeline Builder:

ParameterTypeDefaultDescription
urlstrThe URL of the external service to post the prompt to.
timeoutint50The timeout for requests sent to the URL.

Run Method Parameters

These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.

ParameterTypeDefaultDescription
promptstrThe prompt to pass to the service.
metaOptional[Dict]NoneAdditional metadata related to the prompt.