> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Spans de conversation GenAI



## OpenAPI

````yaml /fr/weave/reference/service-api/openapi.json post /agents/conversations/spans
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /agents/conversations/spans:
    post:
      tags:
        - Agents
      summary: Spans de conversation GenAI
      operationId: genai_conversation_spans_agents_conversations_spans_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentConversationSpansReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConversationSpansRes'
          description: Réponse réussie
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Erreur de validation
components:
  schemas:
    AgentConversationSpansReq:
      description: >-
        Demandez les séquences de spans pour un ensemble explicite de
        conversations.


        Lit uniquement les colonnes scalaires des spans (sans corps de message)
        pour les

        `conversation_ids` donnés. Alimente la mini-carte des spans dans la
        liste des conversations.
      properties:
        conversation_ids:
          items:
            type: string
          maxItems: 10000
          title: Conversation Ids
          type: array
        project_id:
          title: Project Id
          type: string
        started_after:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started After
        started_before:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started Before
      required:
        - project_id
      title: AgentConversationSpansReq
      type: object
    AgentConversationSpansRes:
      description: >-
        Séquences de spans + marqueurs de feedback, une entrée par conversation
        demandée.
      properties:
        conversations:
          items:
            $ref: '#/components/schemas/AgentConversationSpans'
          title: Conversations
          type: array
      title: AgentConversationSpansRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentConversationSpans:
      description: Séquence de spans d’une conversation et ses marqueurs de feedback.
      properties:
        conversation_id:
          title: Conversation Id
          type: string
        spans:
          items:
            $ref: '#/components/schemas/AgentConversationSpan'
          title: Spans
          type: array
        spans_feedback:
          items:
            $ref: '#/components/schemas/AgentConversationSpanFeedback'
          title: Spans Feedback
          type: array
      required:
        - conversation_id
      title: AgentConversationSpans
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AgentConversationSpan:
      description: >-
        Un span dans la trace d’une conversation.


        Renvoyé par `agent_conversation_spans`, qui lit uniquement les colonnes
        scalaires des spans

        (sans corps de message). Les spans sont ordonnés par `started_at`, ce
        qui

        approxime — sans correspondre exactement — l’ordre de parcours de
        l’arborescence

        parent/enfant dans la vue détaillée du chat. `operation_name` est la
        valeur OTel brute ; le

        client l’associe à une catégorie d’affichage.
      properties:
        duration_ms:
          title: Duration Ms
          type: integer
        operation_name:
          title: Operation Name
          type: string
        span_id:
          title: Span Id
          type: string
        status:
          enum:
            - UNSET
            - OK
            - ERROR
          title: Status
          type: string
        trace_id:
          title: Trace Id
          type: string
      required:
        - operation_name
        - trace_id
        - span_id
        - status
        - duration_ms
      title: AgentConversationSpan
      type: object
    AgentConversationSpanFeedback:
      description: >-
        Tags et scores appliqués à un tour de conversation (ou à la conversation
        elle-même).


        Positionnés côté client en faisant correspondre `trace_id` (tour de
        conversation) aux spans ;

        `trace_id` vaut None pour le feedback au niveau de la conversation.
      properties:
        feedback_type:
          enum:
            - wandb.agent_user_feedback
            - wandb.agent_monitor
          title: Feedback Type
          type: string
        ratings:
          description: Scores numériques du scorer appliqués à ce feedback.
          items:
            $ref: '#/components/schemas/AgentConversationSpanRating'
          title: Ratings
          type: array
        tags:
          description: Tags descriptifs arbitraires appliqués à ce feedback.
          examples:
            - - 👍
              - needs-review
          items:
            type: string
          title: Tags
          type: array
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Tour de conversation auquel ce feedback est rattaché ; None au
            niveau de la conversation.
          title: Trace Id
      required:
        - trace_id
        - feedback_type
      title: AgentConversationSpanFeedback
      type: object
    AgentConversationSpanRating:
      description: >-
        Un score numérique (score de scorer) appliqué à un tour de conversation
        ou à une conversation.
      properties:
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        name:
          title: Name
          type: string
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        value:
          title: Value
          type: number
      required:
        - name
        - value
      title: AgentConversationSpanRating
      type: object

````