Prompts
(prompts)
Overview
Operations related to prompts. A prompt defines the behavior of an agent by delivering instructions to the LLM about how the agent should behave. A prompt can be linked to one or more agents. A prompt can also be linked to tools to allow an agent using the prompt to use them.
Available Operations
- list - Prompt List
- create - Create Prompt
- update - Update Prompt
- getById - Get Prompt By Id
- delete - Delete Prompt
- promptsHistory - Get Prompt History
list
List the existing prompts
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.PromptsListRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ListResponsePromptResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
create
Create a new prompt
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | components.PromptCreateRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PromptResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
update
Update an existing prompt
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | components.PromptUpdateRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PromptResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
getById
Get a prompt by ID
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.PromptsGetByIdRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PromptResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
delete
Delete a prompt
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.PromptsDeleteRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise\ANY>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
promptsHistory
Get a prompt by ID
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.PromptsHistoryRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.PromptHistory[]>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |