openapi: 3.1.0
info:
  title: TrumpfGPT LangChain Server
  description: |-
    TrumpfGPT API server for geral chat and rag usecase
            using Langchain's Runnable interfaces
  version: '1.0'
paths:
  /base/input_schema:
    get:
      tags:
        - base
      summary: Base Input Schema
      description: Return the input schema.
      operationId: base_input_schema_base_input_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - APIKeyHeader: []
  /base/c/{config_hash}/input_schema:
    get:
      tags:
        - base/config
      summary: Base Input Schema With Config
      description: Return the input schema.
      operationId: base_input_schema_with_config_base_c__config_hash__input_schema_get
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/output_schema:
    get:
      tags:
        - base
      summary: Base Output Schema
      description: Return the output schema.
      operationId: base_output_schema_base_output_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - APIKeyHeader: []
  /base/c/{config_hash}/output_schema:
    get:
      tags:
        - base/config
      summary: Base Output Schema With Config
      description: Return the output schema.
      operationId: base_output_schema_with_config_base_c__config_hash__output_schema_get
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/config_schema:
    get:
      tags:
        - base
      summary: Base Config Schema
      description: Return the config schema.
      operationId: base_config_schema_base_config_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - APIKeyHeader: []
  /base/c/{config_hash}/config_schema:
    get:
      tags:
        - base/config
      summary: Base Config Schema With Config
      description: Return the config schema.
      operationId: base_config_schema_with_config_base_c__config_hash__config_schema_get
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/token_feedback:
    post:
      summary: Create Feedback From Token
      description: Send feedback on an individual run to langsmith.
      operationId: create_feedback_from_token_base_token_feedback_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackCreateRequestTokenBased'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
  /base/invoke:
    post:
      tags:
        - base
      summary: Base Invoke
      description: Invoke the runnable with the given input and config.
      operationId: base_invoke_base_invoke_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseInvokeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/baseInvokeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/c/{config_hash}/invoke:
    post:
      tags:
        - base/config
      summary: Base Invoke With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /invoke endpoint without the `c/{config_hash}` path
        parameter.
      operationId: base_invoke_with_config_base_c__config_hash__invoke_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseInvokeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/baseInvokeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/stream:
    post:
      tags:
        - base
      summary: Base Stream
      description: >-
        This endpoint allows to stream the output of the runnable. The endpoint
        uses a server sent event stream to stream the output.
        https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
      operationId: base_stream_base_stream_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseStreamRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/c/{config_hash}/stream:
    post:
      tags:
        - base/config
      summary: Base Stream With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /stream endpoint without the `c/{config_hash}` path
        parameter.
      operationId: base_stream_with_config_base_c__config_hash__stream_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseStreamRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/stream_log:
    post:
      tags:
        - base
      summary: Base Stream Log
      description: |-
        Invoke the runnable stream_log the output.

        This endpoint allows to stream the output of the runnable, including
        the output of all intermediate steps.

        The endpoint uses a server sent event stream to stream the output.

        https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

        Important: Set the "text/event-stream" media type for request headers if
                   not using an existing SDK.

        This endpoint uses two different types of events:

        * data - for streaming the output of the runnable

            {
                "event": "data",
                "data": {
                ...
                }
            }

        * error - for signaling an error in the stream, also ends the stream.

        {
            "event": "error",
            "data": {
                "status_code": 500,
                "message": "Internal Server Error"
            }
        }

        * end - for signaling the end of the stream.

            This helps the client to know when to stop listening for events and
            know that the streaming has ended successfully.

            {
                "event": "end",
            }
      operationId: base_stream_log_base_stream_log_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseStreamLogRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/c/{config_hash}/stream_log:
    post:
      tags:
        - base/config
      summary: Base Stream Log With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /stream_log endpoint without the `c/{config_hash}`
        path parameter.
      operationId: base_stream_log_with_config_base_c__config_hash__stream_log_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseStreamLogRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/stream_events:
    post:
      tags:
        - base
      summary: Base Stream Events
      description: |-
        Stream events from the given runnable.

        This endpoint allows to stream events from the runnable, including
        events from all intermediate steps.

        **Attention**

            This is a new endpoint that only works for langchain-core >= 0.1.14.

            It belongs to a Beta API that may change in the future.

        **Important**
            Specify filters to the events you want to receive by setting
            the appropriate filters in the request body.

            This will help avoid sending too much data over the network.

            It will also prevent serialization issues with
            any unsupported types since it won't need to serialize events
            that aren't transmitted.

        The endpoint uses a server sent event stream to stream the output.

        https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

        The encoding of events follows the following format:

        * data - for streaming the output of the runnable

            {
                "event": "data",
                "data": {
                ...
                }
            }

        * error - for signaling an error in the stream, also ends the stream.

        {
            "event": "error",
            "data": {
                "status_code": 500,
                "message": "Internal Server Error"
            }
        }

        * end - for signaling the end of the stream.

            This helps the client to know when to stop listening for events and
            know that the streaming has ended successfully.

            {
                "event": "end",
            }

        `data` for the `data` event is a JSON object that corresponds
        to a serialized representation of a StreamEvent.

        See LangChain documentation for more information about astream_events.
      operationId: base_stream_events_base_stream_events_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseStreamEventsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /base/c/{config_hash}/stream_events:
    post:
      tags:
        - base/config
      summary: Base Stream Events With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /stream_events endpoint without the `c/{config_hash}`
        path parameter.
      operationId: base_stream_events_with_config_base_c__config_hash__stream_events_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/baseStreamEventsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/input_schema:
    get:
      tags:
        - rag
      summary: Rag Input Schema
      description: Return the input schema.
      operationId: rag_input_schema_rag_input_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - APIKeyHeader: []
  /rag/c/{config_hash}/input_schema:
    get:
      tags:
        - rag/config
      summary: Rag Input Schema With Config
      description: Return the input schema.
      operationId: rag_input_schema_with_config_rag_c__config_hash__input_schema_get
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/output_schema:
    get:
      tags:
        - rag
      summary: Rag Output Schema
      description: Return the output schema.
      operationId: rag_output_schema_rag_output_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - APIKeyHeader: []
  /rag/c/{config_hash}/output_schema:
    get:
      tags:
        - rag/config
      summary: Rag Output Schema With Config
      description: Return the output schema.
      operationId: rag_output_schema_with_config_rag_c__config_hash__output_schema_get
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/config_schema:
    get:
      tags:
        - rag
      summary: Rag Config Schema
      description: Return the config schema.
      operationId: rag_config_schema_rag_config_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - APIKeyHeader: []
  /rag/c/{config_hash}/config_schema:
    get:
      tags:
        - rag/config
      summary: Rag Config Schema With Config
      description: Return the config schema.
      operationId: rag_config_schema_with_config_rag_c__config_hash__config_schema_get
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/token_feedback:
    post:
      summary: Create Feedback From Token
      description: Send feedback on an individual run to langsmith.
      operationId: create_feedback_from_token_rag_token_feedback_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackCreateRequestTokenBased'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
  /rag/invoke:
    post:
      tags:
        - rag
      summary: Rag Invoke
      description: Invoke the runnable with the given input and config.
      operationId: rag_invoke_rag_invoke_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragInvokeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ragInvokeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/c/{config_hash}/invoke:
    post:
      tags:
        - rag/config
      summary: Rag Invoke With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /invoke endpoint without the `c/{config_hash}` path
        parameter.
      operationId: rag_invoke_with_config_rag_c__config_hash__invoke_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragInvokeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ragInvokeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/stream:
    post:
      tags:
        - rag
      summary: Rag Stream
      description: >-
        This endpoint allows to stream the output of the runnable. The endpoint
        uses a server sent event stream to stream the output.
        https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
      operationId: rag_stream_rag_stream_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragStreamRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/c/{config_hash}/stream:
    post:
      tags:
        - rag/config
      summary: Rag Stream With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /stream endpoint without the `c/{config_hash}` path
        parameter.
      operationId: rag_stream_with_config_rag_c__config_hash__stream_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragStreamRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/stream_log:
    post:
      tags:
        - rag
      summary: Rag Stream Log
      description: |-
        Invoke the runnable stream_log the output.

        This endpoint allows to stream the output of the runnable, including
        the output of all intermediate steps.

        The endpoint uses a server sent event stream to stream the output.

        https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

        Important: Set the "text/event-stream" media type for request headers if
                   not using an existing SDK.

        This endpoint uses two different types of events:

        * data - for streaming the output of the runnable

            {
                "event": "data",
                "data": {
                ...
                }
            }

        * error - for signaling an error in the stream, also ends the stream.

        {
            "event": "error",
            "data": {
                "status_code": 500,
                "message": "Internal Server Error"
            }
        }

        * end - for signaling the end of the stream.

            This helps the client to know when to stop listening for events and
            know that the streaming has ended successfully.

            {
                "event": "end",
            }
      operationId: rag_stream_log_rag_stream_log_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragStreamLogRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/c/{config_hash}/stream_log:
    post:
      tags:
        - rag/config
      summary: Rag Stream Log With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /stream_log endpoint without the `c/{config_hash}`
        path parameter.
      operationId: rag_stream_log_with_config_rag_c__config_hash__stream_log_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragStreamLogRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/stream_events:
    post:
      tags:
        - rag
      summary: Rag Stream Events
      description: |-
        Stream events from the given runnable.

        This endpoint allows to stream events from the runnable, including
        events from all intermediate steps.

        **Attention**

            This is a new endpoint that only works for langchain-core >= 0.1.14.

            It belongs to a Beta API that may change in the future.

        **Important**
            Specify filters to the events you want to receive by setting
            the appropriate filters in the request body.

            This will help avoid sending too much data over the network.

            It will also prevent serialization issues with
            any unsupported types since it won't need to serialize events
            that aren't transmitted.

        The endpoint uses a server sent event stream to stream the output.

        https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

        The encoding of events follows the following format:

        * data - for streaming the output of the runnable

            {
                "event": "data",
                "data": {
                ...
                }
            }

        * error - for signaling an error in the stream, also ends the stream.

        {
            "event": "error",
            "data": {
                "status_code": 500,
                "message": "Internal Server Error"
            }
        }

        * end - for signaling the end of the stream.

            This helps the client to know when to stop listening for events and
            know that the streaming has ended successfully.

            {
                "event": "end",
            }

        `data` for the `data` event is a JSON object that corresponds
        to a serialized representation of a StreamEvent.

        See LangChain documentation for more information about astream_events.
      operationId: rag_stream_events_rag_stream_events_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragStreamEventsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /rag/c/{config_hash}/stream_events:
    post:
      tags:
        - rag/config
      summary: Rag Stream Events With Config
      description: >-
        This endpoint is to be used with share links generated by the LangServe
        playground. The hash is an LZString compressed JSON string. For regular
        use cases, use the /stream_events endpoint without the `c/{config_hash}`
        path parameter.
      operationId: rag_stream_events_with_config_rag_c__config_hash__stream_events_post
      security:
        - APIKeyHeader: []
      parameters:
        - name: config_hash
          in: path
          required: true
          schema:
            type: string
            title: Config Hash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ragStreamEventsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /set-cookie/:
    get:
      summary: Set Cookie
      operationId: set_cookie_set_cookie__get
      security:
        - APIKeyHeader: []
      parameters:
        - name: user_id
          in: query
          required: true
          schema:
            type: string
            description: The value of the user_id cookie
            title: User Id
          description: The value of the user_id cookie
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CookieResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /qa:
    post:
      summary: Retrieval Route
      operationId: retrieval_route_qa_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QAInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
  /chat:
    post:
      summary: Chat Route
      operationId: chat_route_chat_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    BodyModel:
      properties:
        text:
          type: string
          title: Text
        timestamp:
          type: string
          title: Timestamp
        id:
          type: string
          title: Id
        metadata:
          type: string
          title: Metadata
      type: object
      required:
        - text
        - timestamp
        - id
        - metadata
      title: BodyModel
      description: Model for the body of the chat response.
    ChatInput:
      properties:
        question:
          type: string
          title: Question
      type: object
      required:
        - question
      title: ChatInput
      description: Input for the chat (and base chat) endpoint.
    ChatResponse:
      properties:
        body:
          $ref: '#/components/schemas/BodyModel'
        headers:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Headers
        statusCode:
          type: integer
          title: Statuscode
          default: 200
      type: object
      required:
        - body
        - headers
      title: ChatResponse
      description: Response for the chat and qa endpoint.
    CookieResponse:
      properties:
        message:
          type: string
          title: Message
        value:
          type: string
          title: Value
      type: object
      required:
        - message
        - value
      title: CookieResponse
      description: Model for the body of the set-cookie response.
    FeedbackCreateRequestTokenBased:
      properties:
        token_or_url:
          anyOf:
            - type: string
              format: uuid
            - type: string
          title: Token Or Url
        score:
          anyOf:
            - type: number
            - type: integer
            - type: boolean
            - type: 'null'
          title: Score
        value:
          anyOf:
            - type: number
            - type: integer
            - type: boolean
            - type: string
            - type: object
            - type: 'null'
          title: Value
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        correction:
          anyOf:
            - type: object
            - type: 'null'
          title: Correction
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - token_or_url
      title: FeedbackCreateRequestTokenBased
      description: >-
        Shared information between create requests of feedback and feedback
        objects.
    FeedbackToken:
      properties:
        key:
          type: string
          title: Key
        token_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Token Url
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - key
      title: FeedbackToken
      description: Represents the feedback tokens for a given request.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InvokeResponseMetadata:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
        feedback_tokens:
          items:
            $ref: '#/components/schemas/FeedbackToken'
          type: array
          title: Feedback Tokens
          description: >-
            Feedback tokens from the given run.These tokens allow a user to
            provide feedback on the run.Only available if server was configured
            to provide feedback tokens.
      type: object
      required:
        - run_id
        - feedback_tokens
      title: InvokeResponseMetadata
      description: |-
        Represents response metadata used for just single input/output LangServe
        responses.
    QAInput:
      properties:
        question:
          type: string
          title: Question
        filter:
          type: object
          title: Filter
      type: object
      required:
        - question
        - filter
      title: QAInput
      description: Input for the qa (rag chat) endpoint
    RunnableWithChatHistoryOutput:
      type: object
      title: RunnableWithChatHistoryOutput
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    baseConfigurable:
      properties:
        conversation_id:
          type: string
          title: conversation_id
          description: Unique identifier for the conversation.
          default: ''
        user_id:
          type: string
          title: user_id
          description: Unique identifier for the user.
          default: ''
      type: object
      title: baseConfigurable
    baseInvokeRequest:
      properties:
        input:
          $ref: '#/components/schemas/ChatInput'
          description: The input to the runnable.
        config:
          $ref: '#/components/schemas/baseRunnableSequenceConfig'
          description: >-
            Subset of RunnableConfig object in LangChain. Useful for passing
            information like tags, metadata etc.
        kwargs:
          type: object
          title: Kwargs
          description: Keyword arguments to the runnable. Currently ignored.
      type: object
      required:
        - input
      title: baseInvokeRequest
    baseInvokeResponse:
      properties:
        output:
          $ref: '#/components/schemas/RunnableWithChatHistoryOutput'
          description: The output of the invocation.
        metadata:
          $ref: '#/components/schemas/InvokeResponseMetadata'
          description: Metadata about the response that may be useful to specific clients
      type: object
      required:
        - output
        - metadata
      title: baseInvokeResponse
    baseRunnableSequenceConfig:
      properties:
        configurable:
          $ref: '#/components/schemas/baseConfigurable'
          title: configurable
      type: object
      title: baseRunnableSequenceConfig
    baseStreamEventsRequest:
      properties:
        input:
          $ref: '#/components/schemas/ChatInput'
        config:
          $ref: '#/components/schemas/baseRunnableSequenceConfig'
        include_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Names
          description: If specified, filter to runnables with matching names
        include_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Types
          description: If specified, filter to runnables with matching types
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Tags
          description: If specified, filter to runnables with matching tags
        exclude_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Names
          description: If specified, exclude runnables with matching names
        exclude_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Types
          description: If specified, exclude runnables with matching types
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Tags
          description: If specified, exclude runnables with matching tags
        kwargs:
          type: object
          title: Kwargs
      type: object
      required:
        - input
      title: baseStreamEventsRequest
    baseStreamLogRequest:
      properties:
        input:
          $ref: '#/components/schemas/ChatInput'
        config:
          $ref: '#/components/schemas/baseRunnableSequenceConfig'
        include_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Names
          description: If specified, filter to runnables with matching names
        include_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Types
          description: If specified, filter to runnables with matching types
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Tags
          description: If specified, filter to runnables with matching tags
        exclude_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Names
          description: If specified, exclude runnables with matching names
        exclude_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Types
          description: If specified, exclude runnables with matching types
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Tags
          description: If specified, exclude runnables with matching tags
        kwargs:
          type: object
          title: Kwargs
      type: object
      required:
        - input
      title: baseStreamLogRequest
    baseStreamRequest:
      properties:
        input:
          $ref: '#/components/schemas/ChatInput'
          description: The input to the runnable.
        config:
          $ref: '#/components/schemas/baseRunnableSequenceConfig'
          description: >-
            Subset of RunnableConfig object in LangChain. Useful for passing
            information like tags, metadata etc.
        kwargs:
          type: object
          title: Kwargs
          description: Keyword arguments to the runnable. Currently ignored.
      type: object
      required:
        - input
      title: baseStreamRequest
    ragConfigurable:
      properties:
        conversation_id:
          type: string
          title: conversation_id
          description: Unique identifier for the conversation.
          default: ''
        user_id:
          type: string
          title: user_id
          description: Unique identifier for the user.
          default: ''
      type: object
      title: ragConfigurable
    ragInvokeRequest:
      properties:
        input:
          $ref: '#/components/schemas/QAInput'
          description: The input to the runnable.
        config:
          $ref: '#/components/schemas/ragRunnableSequenceConfig'
          description: >-
            Subset of RunnableConfig object in LangChain. Useful for passing
            information like tags, metadata etc.
        kwargs:
          type: object
          title: Kwargs
          description: Keyword arguments to the runnable. Currently ignored.
      type: object
      required:
        - input
      title: ragInvokeRequest
    ragInvokeResponse:
      properties:
        output:
          $ref: '#/components/schemas/RunnableWithChatHistoryOutput'
          description: The output of the invocation.
        metadata:
          $ref: '#/components/schemas/InvokeResponseMetadata'
          description: Metadata about the response that may be useful to specific clients
      type: object
      required:
        - output
        - metadata
      title: ragInvokeResponse
    ragRunnableSequenceConfig:
      properties:
        configurable:
          $ref: '#/components/schemas/ragConfigurable'
          title: configurable
      type: object
      title: ragRunnableSequenceConfig
    ragStreamEventsRequest:
      properties:
        input:
          $ref: '#/components/schemas/QAInput'
        config:
          $ref: '#/components/schemas/ragRunnableSequenceConfig'
        include_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Names
          description: If specified, filter to runnables with matching names
        include_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Types
          description: If specified, filter to runnables with matching types
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Tags
          description: If specified, filter to runnables with matching tags
        exclude_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Names
          description: If specified, exclude runnables with matching names
        exclude_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Types
          description: If specified, exclude runnables with matching types
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Tags
          description: If specified, exclude runnables with matching tags
        kwargs:
          type: object
          title: Kwargs
      type: object
      required:
        - input
      title: ragStreamEventsRequest
    ragStreamLogRequest:
      properties:
        input:
          $ref: '#/components/schemas/QAInput'
        config:
          $ref: '#/components/schemas/ragRunnableSequenceConfig'
        include_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Names
          description: If specified, filter to runnables with matching names
        include_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Types
          description: If specified, filter to runnables with matching types
        include_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include Tags
          description: If specified, filter to runnables with matching tags
        exclude_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Names
          description: If specified, exclude runnables with matching names
        exclude_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Types
          description: If specified, exclude runnables with matching types
        exclude_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Tags
          description: If specified, exclude runnables with matching tags
        kwargs:
          type: object
          title: Kwargs
      type: object
      required:
        - input
      title: ragStreamLogRequest
    ragStreamRequest:
      properties:
        input:
          $ref: '#/components/schemas/QAInput'
          description: The input to the runnable.
        config:
          $ref: '#/components/schemas/ragRunnableSequenceConfig'
          description: >-
            Subset of RunnableConfig object in LangChain. Useful for passing
            information like tags, metadata etc.
        kwargs:
          type: object
          title: Kwargs
          description: Keyword arguments to the runnable. Currently ignored.
      type: object
      required:
        - input
      title: ragStreamRequest
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: trumpfgptApiKey
tags:
  - name: base
  - name: base/config
    description: >-
      Endpoints with a default configuration set by `config_hash` path
      parameter. Used in conjunction with share links generated using the
      LangServe UI playground. The hash is an LZString compressed JSON string.
  - name: rag
  - name: rag/config
    description: >-
      Endpoints with a default configuration set by `config_hash` path
      parameter. Used in conjunction with share links generated using the
      LangServe UI playground. The hash is an LZString compressed JSON string.
