code-metric-generation

Create Code Metric Generation

Changed on

Generate scorer code from a user message (natural language, existing code, or combination).

Creates a background job that calls an LLM with the code metric generation system prompt. Returns a generation ID for polling.

Response: 202 Accepted with generation ID.

post/code-metric-generations

Request

  • Base URL
    https://api.galileo.ai
  • URL
    https://api.galileo.ai/code-metric-generations
  • Auth
    • API key in header Splunk-AO-API-Key
    • or API key in header Galileo-API-Key
    • or OAuth 2
      Password
      Token URL: https://api.galileo.ai/login
    • or HTTP basic

Request body

user_messagestring required

Natural language, code, or combination

node_typestring nullable

Selected scoreable node type (llm, retriever, trace, agent, workflow, tool, session)

output_type'boolean' | 'categorical' | 'count' | 'discrete' | 'freeform' | 'percentage' | 'multilabel' | 'retrieved_chunk_list_boolean' | 'boolean_multilabel' | 'boolean_probability'

Enumeration of output types.

model_namestring nullable

Model alias to use for generation. Defaults to best available.

Response

Successful Response

idstring uuid4 required
status'generating' | 'completed' | 'failed' required

Changes

    • info

      added the new boolean_probability enum value to the request property /

    • info

      the endpoint scheme security ClassicAPIKeyHeader was added to the API

    • info

      added the new optional request property