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

# 로그

> trajectory를 기록하고 메트릭을 계산합니다.



## OpenAPI

````yaml /ko/serverless-training/api-reference/openapi.json post /v1/preview/models/{model_id}/log
openapi: 3.1.0
info:
  title: Serverless Training
  version: 1.0.0
servers: []
security: []
paths:
  /v1/preview/models/{model_id}/log:
    post:
      tags:
        - models
      summary: 로그
      description: trajectory를 기록하고 메트릭을 계산합니다.
      operationId: log_v1_preview_models__model_id__log_post
      parameters:
        - in: path
          name: model_id
          required: true
          schema:
            title: Model Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
      security:
        - HTTPBearer: []
components:
  schemas:
    LogRequest:
      description: trajectory 로깅용 스키마입니다.
      properties:
        split:
          title: Split
          type: string
        trajectory_groups:
          items:
            $ref: '#/components/schemas/TrajectoryGroup'
          title: Trajectory Groups
          type: array
      required:
        - split
        - trajectory_groups
      title: LogRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    TrajectoryGroup:
      properties:
        trajectories:
          items:
            $ref: '#/components/schemas/Trajectory'
          title: Trajectories
          type: array
      required:
        - trajectories
      title: TrajectoryGroup
      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
    Trajectory:
      properties:
        additional_histories:
          default: []
          items:
            $ref: '#/components/schemas/History'
          title: Additional Histories
          type: array
        final_policy_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Final Policy Version
        initial_policy_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Initial Policy Version
        logs:
          default: []
          items:
            type: string
          title: Logs
          type: array
        messages_and_choices:
          default: []
          items:
            anyOf:
              - $ref: '#/components/schemas/ChatCompletionDeveloperMessageParam'
              - $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
              - $ref: '#/components/schemas/ChatCompletionUserMessageParam'
              - $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
              - $ref: '#/components/schemas/ChatCompletionToolMessageParam'
              - $ref: '#/components/schemas/ChatCompletionFunctionMessageParam'
              - $ref: '#/components/schemas/Choice'
          title: Messages And Choices
          type: array
        metadata:
          additionalProperties:
            anyOf:
              - type: number
              - type: integer
              - type: string
              - type: boolean
              - type: 'null'
          default: {}
          title: Metadata
          type: object
        metrics:
          additionalProperties:
            anyOf:
              - type: number
              - type: integer
              - type: boolean
          default: {}
          title: Metrics
          type: object
        reward:
          default: 0
          title: Reward
          type: number
        start_time:
          format: date-time
          title: Start Time
          type: string
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionFunctionToolParam'
              type: array
            - type: 'null'
          title: Tools
      title: Trajectory
      type: object
    History:
      properties:
        messages_and_choices:
          items:
            anyOf:
              - $ref: '#/components/schemas/ChatCompletionDeveloperMessageParam'
              - $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
              - $ref: '#/components/schemas/ChatCompletionUserMessageParam'
              - $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
              - $ref: '#/components/schemas/ChatCompletionToolMessageParam'
              - $ref: '#/components/schemas/ChatCompletionFunctionMessageParam'
              - $ref: '#/components/schemas/Choice'
          title: Messages And Choices
          type: array
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionFunctionToolParam'
              type: array
            - type: 'null'
          title: Tools
      required:
        - messages_and_choices
      title: History
      type: object
    ChatCompletionDeveloperMessageParam:
      description: >-
        사용자가 보낸 메시지와 관계없이 모델이 따라야 하는 개발자 제공 지침입니다. o1 모델 및 이후 모델에서는 `developer`
        메시지가 기존 `system` 메시지를 대체합니다.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
              type: array
          title: Content
        name:
          title: Name
          type: string
        role:
          const: developer
          title: Role
          type: string
      required:
        - content
        - role
      title: ChatCompletionDeveloperMessageParam
      type: object
    ChatCompletionSystemMessageParam:
      description: >-
        사용자가 보낸 메시지와 관계없이 모델이 따라야 하는 개발자 제공 지침입니다. o1 모델 및 그 이후 모델에서는 이 용도로 대신
        `developer` 메시지를 사용하세요.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
              type: array
          title: Content
        name:
          title: Name
          type: string
        role:
          const: system
          title: Role
          type: string
      required:
        - content
        - role
      title: ChatCompletionSystemMessageParam
      type: object
    ChatCompletionUserMessageParam:
      description: 프롬프트 또는 추가 컨텍스트 정보를 포함한, 최종 사용자가 보낸 메시지입니다.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartImageParam'
                  - $ref: >-
                      #/components/schemas/ChatCompletionContentPartInputAudioParam
                  - $ref: '#/components/schemas/File'
              type: array
          title: Content
        name:
          title: Name
          type: string
        role:
          const: user
          title: Role
          type: string
      required:
        - content
        - role
      title: ChatCompletionUserMessageParam
      type: object
    ChatCompletionAssistantMessageParam:
      description: 사용자 메시지에 대한 응답으로 모델이 보낸 메시지입니다.
      properties:
        audio:
          anyOf:
            - $ref: '#/components/schemas/Audio'
            - type: 'null'
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartRefusalParam'
              type: array
            - type: 'null'
          title: Content
        function_call:
          anyOf:
            - $ref: >-
                #/components/schemas/openai__types__chat__chat_completion_assistant_message_param__FunctionCall
            - type: 'null'
        name:
          title: Name
          type: string
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          title: Refusal
        role:
          const: assistant
          title: Role
          type: string
        tool_calls:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/ChatCompletionMessageFunctionToolCallParam
              - $ref: '#/components/schemas/ChatCompletionMessageCustomToolCallParam'
          title: Tool Calls
          type: array
      required:
        - role
      title: ChatCompletionAssistantMessageParam
      type: object
    ChatCompletionToolMessageParam:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
              type: array
          title: Content
        role:
          const: tool
          title: Role
          type: string
        tool_call_id:
          title: Tool Call Id
          type: string
      required:
        - content
        - role
        - tool_call_id
      title: ChatCompletionToolMessageParam
      type: object
    ChatCompletionFunctionMessageParam:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        name:
          title: Name
          type: string
        role:
          const: function
          title: Role
          type: string
      required:
        - content
        - name
        - role
      title: ChatCompletionFunctionMessageParam
      type: object
    Choice:
      additionalProperties: true
      properties:
        finish_reason:
          enum:
            - stop
            - length
            - tool_calls
            - content_filter
            - function_call
          title: Finish Reason
          type: string
        index:
          title: Index
          type: integer
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/ChoiceLogprobs'
            - type: 'null'
        message:
          $ref: '#/components/schemas/ChatCompletionMessage'
      required:
        - finish_reason
        - index
        - message
      title: Choice
      type: object
    ChatCompletionFunctionToolParam:
      description: 응답을 생성하는 데 사용할 수 있는 함수 도구입니다.
      properties:
        function:
          $ref: '#/components/schemas/FunctionDefinition'
        type:
          const: function
          title: Type
          type: string
      required:
        - function
        - type
      title: ChatCompletionFunctionToolParam
      type: object
    ChatCompletionContentPartTextParam:
      description: >-
        [텍스트 입력](https://platform.openai.com/docs/guides/text-generation)에 대해
        알아보세요.
      properties:
        text:
          title: Text
          type: string
        type:
          const: text
          title: Type
          type: string
      required:
        - text
        - type
      title: ChatCompletionContentPartTextParam
      type: object
    ChatCompletionContentPartImageParam:
      description: '[이미지 입력](https://platform.openai.com/docs/guides/vision)에 대해 알아보세요.'
      properties:
        image_url:
          $ref: '#/components/schemas/ImageURL'
        type:
          const: image_url
          title: Type
          type: string
      required:
        - image_url
        - type
      title: ChatCompletionContentPartImageParam
      type: object
    ChatCompletionContentPartInputAudioParam:
      description: '[오디오 입력](https://platform.openai.com/docs/guides/audio)에 대해 알아보세요.'
      properties:
        input_audio:
          $ref: '#/components/schemas/InputAudio'
        type:
          const: input_audio
          title: Type
          type: string
      required:
        - input_audio
        - type
      title: ChatCompletionContentPartInputAudioParam
      type: object
    File:
      description: >-
        텍스트 생성을 위한 [file inputs](https://platform.openai.com/docs/guides/text)에
        대해 알아보세요.
      properties:
        file:
          $ref: '#/components/schemas/FileFile'
        type:
          const: file
          title: Type
          type: string
      required:
        - file
        - type
      title: File
      type: object
    Audio:
      description: |-
        모델의 이전 오디오 응답에 대한 데이터입니다.
        [자세히 알아보기](https://platform.openai.com/docs/guides/audio).
      properties:
        id:
          title: Id
          type: string
      required:
        - id
      title: Audio
      type: object
    ChatCompletionContentPartRefusalParam:
      properties:
        refusal:
          title: Refusal
          type: string
        type:
          const: refusal
          title: Type
          type: string
      required:
        - refusal
        - type
      title: ChatCompletionContentPartRefusalParam
      type: object
    openai__types__chat__chat_completion_assistant_message_param__FunctionCall:
      description: |-
        사용 중단되었으며 `tool_calls`로 대체되었습니다.

        모델이 생성한, 호출할 함수의 이름과 인수입니다.
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - arguments
        - name
      title: FunctionCall
      type: object
    ChatCompletionMessageFunctionToolCallParam:
      description: 모델이 생성한 함수 도구 call입니다.
      properties:
        function:
          $ref: >-
            #/components/schemas/openai__types__chat__chat_completion_message_function_tool_call_param__Function
        id:
          title: Id
          type: string
        type:
          const: function
          title: Type
          type: string
      required:
        - id
        - function
        - type
      title: ChatCompletionMessageFunctionToolCallParam
      type: object
    ChatCompletionMessageCustomToolCallParam:
      description: 모델이 생성한 맞춤형 도구 call입니다.
      properties:
        custom:
          $ref: >-
            #/components/schemas/openai__types__chat__chat_completion_message_custom_tool_call_param__Custom
        id:
          title: Id
          type: string
        type:
          const: custom
          title: Type
          type: string
      required:
        - id
        - custom
        - type
      title: ChatCompletionMessageCustomToolCallParam
      type: object
    ChoiceLogprobs:
      additionalProperties: true
      description: 해당 choice의 로그 확률 정보입니다.
      properties:
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionTokenLogprob'
              type: array
            - type: 'null'
          title: Content
        refusal:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionTokenLogprob'
              type: array
            - type: 'null'
          title: Refusal
      title: ChoiceLogprobs
      type: object
    ChatCompletionMessage:
      additionalProperties: true
      description: 모델이 생성한 chat completion 메시지입니다.
      properties:
        annotations:
          anyOf:
            - items:
                $ref: '#/components/schemas/Annotation'
              type: array
            - type: 'null'
          title: Annotations
        audio:
          anyOf:
            - $ref: '#/components/schemas/ChatCompletionAudio'
            - type: 'null'
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall'
            - type: 'null'
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          title: Refusal
        role:
          const: assistant
          title: Role
          type: string
        tool_calls:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ChatCompletionMessageFunctionToolCall'
                  - $ref: '#/components/schemas/ChatCompletionMessageCustomToolCall'
              type: array
            - type: 'null'
          title: Tool Calls
      required:
        - role
      title: ChatCompletionMessage
      type: object
    FunctionDefinition:
      properties:
        description:
          title: Description
          type: string
        name:
          title: Name
          type: string
        parameters:
          additionalProperties: true
          title: Parameters
          type: object
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strict
      required:
        - name
      title: FunctionDefinition
      type: object
    ImageURL:
      properties:
        detail:
          enum:
            - auto
            - low
            - high
          title: Detail
          type: string
        url:
          title: Url
          type: string
      required:
        - url
      title: ImageURL
      type: object
    InputAudio:
      properties:
        data:
          title: Data
          type: string
        format:
          enum:
            - wav
            - mp3
          title: Format
          type: string
      required:
        - data
        - format
      title: InputAudio
      type: object
    FileFile:
      properties:
        file_data:
          title: File Data
          type: string
        file_id:
          title: File Id
          type: string
        filename:
          title: Filename
          type: string
      title: FileFile
      type: object
    openai__types__chat__chat_completion_message_function_tool_call_param__Function:
      description: 모델이 호출한 함수입니다.
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - arguments
        - name
      title: Function
      type: object
    openai__types__chat__chat_completion_message_custom_tool_call_param__Custom:
      description: 모델이 호출한 맞춤형 도구입니다.
      properties:
        input:
          title: Input
          type: string
        name:
          title: Name
          type: string
      required:
        - input
        - name
      title: Custom
      type: object
    ChatCompletionTokenLogprob:
      additionalProperties: true
      properties:
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Bytes
        logprob:
          title: Logprob
          type: number
        token:
          title: Token
          type: string
        top_logprobs:
          items:
            $ref: '#/components/schemas/TopLogprob'
          title: Top Logprobs
          type: array
      required:
        - token
        - logprob
        - top_logprobs
      title: ChatCompletionTokenLogprob
      type: object
    Annotation:
      additionalProperties: true
      description: 웹 검색 사용 시의 URL 인용입니다.
      properties:
        type:
          const: url_citation
          title: Type
          type: string
        url_citation:
          $ref: '#/components/schemas/AnnotationURLCitation'
      required:
        - type
        - url_citation
      title: Annotation
      type: object
    ChatCompletionAudio:
      additionalProperties: true
      description: >-
        오디오 출력 모달리티가 요청된 경우, 이 객체에는 모델의 오디오 응답 데이터가 포함됩니다. [자세히
        알아보기](https://platform.openai.com/docs/guides/audio).
      properties:
        data:
          title: Data
          type: string
        expires_at:
          title: Expires At
          type: integer
        id:
          title: Id
          type: string
        transcript:
          title: Transcript
          type: string
      required:
        - id
        - data
        - expires_at
        - transcript
      title: ChatCompletionAudio
      type: object
    FunctionCall:
      additionalProperties: true
      description: |-
        사용 중단되었으며 `tool_calls`로 대체되었습니다.

        모델이 생성한, 호출할 함수의 이름과 인수입니다.
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - arguments
        - name
      title: FunctionCall
      type: object
    ChatCompletionMessageFunctionToolCall:
      additionalProperties: true
      description: 모델이 생성한 함수 도구 call입니다.
      properties:
        function:
          $ref: '#/components/schemas/Function'
        id:
          title: Id
          type: string
        type:
          const: function
          title: Type
          type: string
      required:
        - id
        - function
        - type
      title: ChatCompletionMessageFunctionToolCall
      type: object
    ChatCompletionMessageCustomToolCall:
      additionalProperties: true
      description: 모델이 생성한 맞춤형 도구 call입니다.
      properties:
        custom:
          $ref: '#/components/schemas/Custom'
        id:
          title: Id
          type: string
        type:
          const: custom
          title: Type
          type: string
      required:
        - id
        - custom
        - type
      title: ChatCompletionMessageCustomToolCall
      type: object
    TopLogprob:
      additionalProperties: true
      properties:
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Bytes
        logprob:
          title: Logprob
          type: number
        token:
          title: Token
          type: string
      required:
        - token
        - logprob
      title: TopLogprob
      type: object
    AnnotationURLCitation:
      additionalProperties: true
      description: 웹 검색 사용 시의 URL 인용입니다.
      properties:
        end_index:
          title: End Index
          type: integer
        start_index:
          title: Start Index
          type: integer
        title:
          title: Title
          type: string
        url:
          title: Url
          type: string
      required:
        - end_index
        - start_index
        - title
        - url
      title: AnnotationURLCitation
      type: object
    Function:
      additionalProperties: true
      description: 모델이 호출한 함수입니다.
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - arguments
        - name
      title: Function
      type: object
    Custom:
      additionalProperties: true
      description: 모델이 호출한 맞춤형 도구입니다.
      properties:
        input:
          title: Input
          type: string
        name:
          title: Name
          type: string
      required:
        - input
        - name
      title: Custom
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````