Skip to main content

Create Prompt Mixin Prompts

POST 

/api/v1/projects/:project_id/prompts

Create a new PromptMixin prompt set.

Request

Path Parameters

    project_id anyrequired

Query Parameters

    organization_id any

Cookie Parameters

    session any

Body

required

    project_id uuidrequired

    The ID of the project.

    id

    object

    The ID of the prompt set.

    anyOf

    string

    name Name (string)required

    The name of the prompt set.

    prompts

    object[]

    required

    The prompts.

  • Array [

  • prompt_key Prompt Key (string)required

    The key of the prompt in the PromptMixin.

    prompt_class Prompt Class (string)required

    The class of the prompt (PromptTemplate or ChatPromptTemplate).

    prompt_type Prompt Type (string)required

    The type of prompt.

    template

    object

    The template of the prompt.

    anyOf

    string

    message_templates

    object

    The chat message templates of the prompt.

    anyOf

  • Array [

  • id uuidrequired
    index Index (integer)required

    The index of the message in the chat.

    annotations

    object[]

    Retrieval annotations for the message.

  • Array [

  • type Type (string)required
    data Data (string)required
    class_name Class Name (string)
    Default value: base_component
  • ]

  • role MessageRole (string)required

    Message role.

    Possible values: [system, user, assistant, function, tool, chatbot, model]

    content

    object

    Text content of the generation

    anyOf

    string

    additional_kwargs

    object

    Additional arguments passed to the model

    property name* string
    class_name Class Name (string)
    Default value: base_component
  • ]

  • ]

Responses

Successful Response

Schema

    project_id uuidrequired

    The ID of the project.

    id

    object

    The ID of the prompt set.

    anyOf

    string

    name Name (string)required

    The name of the prompt set.

    prompts

    object[]

    required

    The prompts.

  • Array [

  • prompt_key Prompt Key (string)required

    The key of the prompt in the PromptMixin.

    prompt_class Prompt Class (string)required

    The class of the prompt (PromptTemplate or ChatPromptTemplate).

    prompt_type Prompt Type (string)required

    The type of prompt.

    template

    object

    The template of the prompt.

    anyOf

    string

    message_templates

    object

    The chat message templates of the prompt.

    anyOf

  • Array [

  • id uuidrequired
    index Index (integer)required

    The index of the message in the chat.

    annotations

    object[]

    Retrieval annotations for the message.

  • Array [

  • type Type (string)required
    data Data (string)required
    class_name Class Name (string)
    Default value: base_component
  • ]

  • role MessageRole (string)required

    Message role.

    Possible values: [system, user, assistant, function, tool, chatbot, model]

    content

    object

    Text content of the generation

    anyOf

    string

    additional_kwargs

    object

    Additional arguments passed to the model

    property name* string
    class_name Class Name (string)
    Default value: base_component
  • ]

  • ]