> ## 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.

# Genai 会話スパン



## OpenAPI

````yaml /ja/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: 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: 正常なレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
components:
  schemas:
    AgentConversationSpansReq:
      description: >-
        明示的に指定した会話セットについて、スパンシーケンスを取得します。


        指定された `conversation_ids`
        について、スパンのスカラー列のみを読み取ります（メッセージ本文は含みません）。これは会話リストのスパンミニマップを支えるものです。
      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: スパンシーケンスとフィードバックマーカーです。リクエストされた各会話につき 1 エントリです。
      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: 1 つの会話のスパンシーケンスとそのフィードバックマーカーです。
      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: >-
        会話のトレース内の 1 つのスパンです。


        `agent_conversation_spans`
        によって返されます。この関数はスパンのスカラー列のみを読み取り、メッセージ本文は読み取りません。スパンは `started_at`
        順に並べられます。これは詳細チャットビューの親子ツリー走査順に近いものの、完全には一致しません。`operation_name` は生の
        OTel 値であり、クライアントが表示カテゴリにマッピングします。
      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: >-
        会話のターン（または会話全体）に適用されたタグと評価です。


        クライアント側で `trace_id`（ターン）をスパンと照合して配置されます。会話レベルのフィードバックでは `trace_id` は
        None です。
      properties:
        feedback_type:
          enum:
            - wandb.agent_user_feedback
            - wandb.agent_monitor
          title: Feedback Type
          type: string
        ratings:
          description: このフィードバックに適用される数値の Scorer 評価です。
          items:
            $ref: '#/components/schemas/AgentConversationSpanRating'
          title: Ratings
          type: array
        tags:
          description: このフィードバックに適用される任意の説明用タグです。
          examples:
            - - 👍
              - needs-review
          items:
            type: string
          title: Tags
          type: array
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          description: このフィードバックの基準となるターンです。会話レベルの場合は None です。
          title: Trace Id
      required:
        - trace_id
        - feedback_type
      title: AgentConversationSpanFeedback
      type: object
    AgentConversationSpanRating:
      description: ターンまたは会話に適用される 1 つの数値評価（Scorer スコア）です。
      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

````