Configuration & Settings
Prompts
Prompts are the instructions given to the AI agent
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.ListResponsePrompt>
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.PromptCreate | 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.Prompt>
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.PromptUpdate | 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.Prompt>
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.Prompt>
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 | */* |