{"openapi":"3.1.0","info":{"title":"Humanloop API","version":"1.0.0"},"paths":{"/chat":{"post":{"operationId":"chats_createStream","summary":"Chat","description":"Get a chat response by providing details of the model configuration in the request.","tags":["chats"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization."},"num_samples":{"type":"integer","default":1,"description":"The number of generations."},"stream":{"type":"boolean","enum":[true],"description":"If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"seed":{"type":"integer","description":"Deprecated field: the seed is instead set as part of the request.config object.","deprecated":true},"return_inputs":{"type":"boolean","default":true,"description":"Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The messages passed to the to provider chat endpoint."},"tool_choice":{"$ref":"#/components/schemas/chats_ChatsCreateStreamRequestToolChoice","description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function."},"tool_call":{"$ref":"#/components/schemas/chats_ChatsCreateStreamRequestToolCall","description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","deprecated":true},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/chats_ChatsCreateStreamRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"model_config":{"$ref":"#/components/schemas/ModelConfigChatRequest","description":"The model configuration used to create a chat response."}},"required":["stream","messages","model_config"]}}}},"security":[{"default":[]}]}},"/chat-deployed":{"post":{"operationId":"chats_create_deployed_stream","summary":"Chat Deployed","description":"Get a chat response using the project's active deployment.\n\nThe active deployment can be a specific model configuration.","tags":["chats"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization."},"num_samples":{"type":"integer","default":1,"description":"The number of generations."},"stream":{"type":"boolean","enum":[true],"description":"If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"seed":{"type":"integer","description":"Deprecated field: the seed is instead set as part of the request.config object.","deprecated":true},"return_inputs":{"type":"boolean","default":true,"description":"Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The messages passed to the to provider chat endpoint."},"tool_choice":{"$ref":"#/components/schemas/chats_ChatsCreateDeployedStreamRequestToolChoice","description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function."},"tool_call":{"$ref":"#/components/schemas/chats_ChatsCreateDeployedStreamRequestToolCall","description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","deprecated":true},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/chats_ChatsCreateDeployedStreamRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"environment":{"type":"string","description":"The environment name used to create a chat response. If not specified, the default environment will be used."}},"required":["stream","messages"]}}}},"security":[{"default":[]}]}},"/chat-model-config":{"post":{"operationId":"chats_create_config_stream","summary":"Chat Model Config","description":"Get chat response for a specific model configuration.","tags":["chats"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization."},"num_samples":{"type":"integer","default":1,"description":"The number of generations."},"stream":{"type":"boolean","enum":[true],"description":"If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"seed":{"type":"integer","description":"Deprecated field: the seed is instead set as part of the request.config object.","deprecated":true},"return_inputs":{"type":"boolean","default":true,"description":"Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The messages passed to the to provider chat endpoint."},"tool_choice":{"$ref":"#/components/schemas/chats_ChatsCreateConfigStreamRequestToolChoice","description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function."},"tool_call":{"$ref":"#/components/schemas/chats_ChatsCreateConfigStreamRequestToolCall","description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","deprecated":true},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/chats_ChatsCreateConfigStreamRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"model_config_id":{"type":"string","description":"Identifies the model configuration used to create a chat response."}},"required":["stream","messages","model_config_id"]}}}},"security":[{"default":[]}]}},"/chat-experiment":{"post":{"operationId":"chats_create_experiment_stream","summary":"Create Experiment Stream","tags":["chats"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}}}}},"/completion":{"post":{"operationId":"completions_createStream","summary":"Create","description":"Create a completion by providing details of the model configuration in the request.","tags":["completions"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/CompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization."},"num_samples":{"type":"integer","default":1,"description":"The number of generations."},"stream":{"type":"boolean","enum":[true],"description":"If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"seed":{"type":"integer","description":"Deprecated field: the seed is instead set as part of the request.config object.","deprecated":true},"return_inputs":{"type":"boolean","default":true,"description":"Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true."},"logprobs":{"type":"integer","description":"Include the log probabilities of the top n tokens in the provider_response"},"suffix":{"type":"string","description":"The suffix that comes after a completion of inserted text. Useful for completions that act like inserts."},"model_config":{"$ref":"#/components/schemas/ModelConfigCompletionRequest","description":"The model configuration used to generate."}},"required":["stream","model_config"]}}}},"security":[{"default":[]}]}},"/completion-deployed":{"post":{"operationId":"completions_create_deployed_stream","summary":"Completion Deployed","description":"Create a completion using the project's active deployment.\n\nThe active deployment can be a specific model configuration.","tags":["completions"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/CompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization."},"num_samples":{"type":"integer","default":1,"description":"The number of generations."},"stream":{"type":"boolean","enum":[true],"description":"If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"seed":{"type":"integer","description":"Deprecated field: the seed is instead set as part of the request.config object.","deprecated":true},"return_inputs":{"type":"boolean","default":true,"description":"Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true."},"logprobs":{"type":"integer","description":"Include the log probabilities of the top n tokens in the provider_response"},"suffix":{"type":"string","description":"The suffix that comes after a completion of inserted text. Useful for completions that act like inserts."},"environment":{"type":"string","description":"The environment name used to create a chat response. If not specified, the default environment will be used."}},"required":["stream"]}}}},"security":[{"default":[]}]}},"/completion-model-config":{"post":{"operationId":"completions_create_config_stream","summary":"Completion Model Config","description":"Create a completion for a specific model configuration.","tags":["completions"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/CompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization."},"num_samples":{"type":"integer","default":1,"description":"The number of generations."},"stream":{"type":"boolean","enum":[true],"description":"If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"seed":{"type":"integer","description":"Deprecated field: the seed is instead set as part of the request.config object.","deprecated":true},"return_inputs":{"type":"boolean","default":true,"description":"Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true."},"logprobs":{"type":"integer","description":"Include the log probabilities of the top n tokens in the provider_response"},"suffix":{"type":"string","description":"The suffix that comes after a completion of inserted text. Useful for completions that act like inserts."},"model_config_id":{"type":"string","description":"Identifies the model configuration used to create a chat response."}},"required":["stream","model_config_id"]}}}},"security":[{"default":[]}]}},"/completion-experiment":{"post":{"operationId":"completions_create_experiment_stream","summary":"Create Experiment Stream","tags":["completions"],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/CompletionResponse"}}}}}}},"/datapoints/{id}":{"get":{"operationId":"datapoints_get","summary":"Get","description":"Get a datapoint by ID.","tags":["datapoints"],"parameters":[{"name":"id","in":"path","description":"String ID of datapoint.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatapointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"patch":{"operationId":"datapoints_update","summary":"Update","description":"Edit the input, messages and criteria fields of a datapoint.\n\nWARNING: This endpoint has been decommissioned and no longer works. Please use the v5 datasets API instead.","tags":["datapoints"],"parameters":[{"name":"id","in":"path","description":"String ID of datapoint.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatapointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"default":[]}]}},"/datapoints":{"delete":{"operationId":"datapoints_delete","summary":"Delete","description":"Delete a list of datapoints by their IDs.\n\nWARNING: This endpoint has been decommissioned and no longer works. Please use the v5 datasets API instead.","tags":["datapoints"],"responses":{"200":{"description":"Successful response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"default":[]}]}},"/projects/{project_id}/datasets":{"get":{"operationId":"projects_list_datasets","summary":"List For Project","description":"Get all datasets for a project.","tags":["projects"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"default":[]}]},"post":{"operationId":"datasets_create","summary":"Create","description":"Create a new dataset for a project.","tags":["datasets"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the dataset."},"description":{"type":"string","maxLength":255,"description":"The description of the dataset."}},"required":["name","description"]}}}},"security":[{"default":[]}]}},"/projects/{project_id}/evaluations":{"get":{"operationId":"projects_list_evaluations","summary":"List For Project","description":"Get all the evaluations associated with your project.\n\nDeprecated: This is a legacy unpaginated endpoint. Use `/evaluations` instead, with appropriate\nsorting, filtering and pagination options.","tags":["projects"],"parameters":[{"name":"project_id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"evaluatee_id","in":"query","description":"String ID of evaluatee version to return. If not defined, the first evaluatee will be returned. Starts with `evv_`.","required":false,"schema":{"type":"string"}},{"name":"evaluator_aggregates","in":"query","description":"Whether to include evaluator aggregates in the response.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"default":[]}]},"post":{"operationId":"evaluations_create","summary":"Create","description":"Create an evaluation.","tags":["evaluations"],"parameters":[{"name":"project_id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config_id":{"type":"string","description":"ID of the config to evaluate. Starts with `config_`."},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"IDs of evaluators to run on the dataset. IDs start with `evfn_`"},"dataset_id":{"type":"string","description":"ID of the dataset to use in this evaluation. Starts with `evts_`."},"provider_api_keys":{"$ref":"#/components/schemas/ProviderApiKeys","description":"API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. Ensure you provide an API key for the provider for the model config you are evaluating, or have one saved to your organization."},"hl_generated":{"type":"boolean","default":true,"description":"Whether the log generations for this evaluation should be performed by Humanloop. If `False`, the log generations should be submitted by the user via the API."},"name":{"type":"string","description":"Name of the Evaluation to help identify it."}},"required":["config_id","evaluator_ids","dataset_id"]}}}},"security":[{"default":[]}]}},"/projects":{"get":{"operationId":"projects_list","summary":"List","description":"Get a paginated list of files.","tags":["projects"],"parameters":[{"name":"page","in":"query","description":"Page offset for pagination.","required":false,"schema":{"type":"integer","default":0}},{"name":"size","in":"query","description":"Page size for pagination. Number of projects to fetch.","required":false,"schema":{"type":"integer","default":10}},{"name":"filter","in":"query","description":"Case-insensitive filter for project name.","required":false,"schema":{"type":"string"}},{"name":"user_filter","in":"query","description":"Case-insensitive filter for users in the project. This filter matches against both email address and name of users.","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Field to sort projects by","required":false,"schema":{"$ref":"#/components/schemas/FileSortBy"}},{"name":"order","in":"query","description":"Direction to sort by.","required":false,"schema":{"$ref":"#/components/schemas/SortOrder"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"post":{"operationId":"projects_create","summary":"Create","description":"Create a new project.","tags":["projects"],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Unique project name."},"directory_id":{"type":"string","description":"ID of directory to assign project to. Starts with `dir_`. If not provided, the project will be created in the root directory."}},"required":["name"]}}}},"security":[{"default":[]}]}},"/projects/{id}":{"get":{"operationId":"projects_get","summary":"Get","description":"Get a specific project.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"delete":{"operationId":"projects_delete","summary":"Delete","description":"Delete a specific file.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"patch":{"operationId":"projects_update","summary":"Update","description":"Update a specific project.\n\nSet the project's active model config by passing `active_model_config_id`.\nThese will be set to the Default environment unless a list of environments\nare also passed in specifically detailing which environments to assign the\nactive config.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The new unique project name. Caution, if you are using the project name as the unique identifier in your API calls, changing the name will break the calls."},"active_config_id":{"type":"string","description":"ID for a config to set as the project's active deployment. Starts with 'config_'. "},"directory_id":{"type":"string","description":"ID of directory to assign project to. Starts with `dir_`."}}}}}},"security":[{"default":[]}]}},"/projects/{id}/configs":{"get":{"operationId":"projects_list_configs","summary":"List Configs","description":"Get an array of versions associated to your file.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"evaluation_aggregates","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectConfigResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/projects/{id}/feedback-types":{"post":{"operationId":"projects_create_feedback_type","summary":"Create Feedback Type","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackTypeModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"The type of feedback to update."},"class":{"$ref":"#/components/schemas/FeedbackClass","description":"The data type associated to this feedback type; whether it is a 'text'/'select'/'multi_select'."},"values":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackLabelRequest"},"description":"The feedback values to be available. This field should only be populated when updating a 'select' or 'multi_select' feedback class."}},"required":["type","class"]}}}},"security":[{"default":[]}]},"patch":{"operationId":"projects_update_feedback_types","summary":"Update Feedback Types","description":"Update feedback types.\n\nWARNING: This endpoint has been decommissioned and no longer works. Please use the v5 Human Evaluators API instead.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"default":[]}]}},"/projects/{id}/export":{"post":{"operationId":"projects_export","summary":"Export","description":"Export all logged datapoints associated to your project.\n\nResults are paginated and sorts the datapoints based on `created_at` in\ndescending order.","tags":["projects"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page offset for pagination.","required":false,"schema":{"type":"integer","default":0}},{"name":"size","in":"query","description":"Page size for pagination. Number of logs to export.","required":false,"schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/projects/{id}/active-config":{"get":{"operationId":"projects_activeConfig_get","summary":"Get Active Config","description":"Retrieves a config to use to execute your model.\n\nA config will be selected based on the project's\nactive config settings.","tags":["projects > activeConfig"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","description":"Name for the environment. E.g. 'production'. If not provided, will return the active config for the default environment.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModelConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"delete":{"operationId":"projects_activeConfig_deactivate","summary":"Deactivate Config","description":"Remove the project's active config, if set.\n\nThis has no effect if the project does not have an active model config set.","tags":["projects > activeConfig"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","description":"Name for the environment. E.g. 'production'. If not provided, will delete the active config for the default environment.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/projects/{id}/deployed-configs":{"get":{"operationId":"projects_deployedConfig_list","summary":"List Deployed Configs","description":"Get an array of environments with the deployed configs associated to your project.","tags":["projects > deployedConfig"],"parameters":[{"name":"id","in":"path","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentProjectConfigResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/projects/{project_id}/deploy-config":{"patch":{"operationId":"projects_deployedConfig_deploy","summary":"Deploy Config","description":"Deploy a model config to an environment.\n\nIf the environment already has a model config deployed, it will be replaced.","tags":["projects > deployedConfig"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentProjectConfigResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config_id":{"type":"string","description":"Model config unique identifier generated by Humanloop."},"environments":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentRequest"},"description":"List of environments to associate with the model config."}},"required":["config_id"]}}}},"security":[{"default":[]}]}},"/projects/{project_id}/deployed-config/{environment_id}":{"delete":{"operationId":"projects_deployedConfig_delete","summary":"Delete Deployed Config","description":"Remove the version deployed to environment.\n\nThis has no effect if the project does not have an active version set.","tags":["projects > deployedConfig"],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/datasets":{"get":{"operationId":"datasets_list","summary":"List ","description":"Get all Datasets for an organization.","tags":["datasets"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/datasets/{id}":{"get":{"operationId":"datasets_get","summary":"Get","description":"Get a single dataset by ID.","tags":["datasets"],"parameters":[{"name":"id","in":"path","description":"String ID of dataset. Starts with `evts_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"delete":{"operationId":"datasets_delete","summary":"Delete","description":"Delete a dataset by ID.","tags":["datasets"],"parameters":[{"name":"id","in":"path","description":"String ID of dataset. Starts with `evts_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"patch":{"operationId":"datasets_update","summary":"Update","description":"Update a testset by ID.","tags":["datasets"],"parameters":[{"name":"id","in":"path","description":"String ID of testset. Starts with `evts_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"The name of the dataset."},"description":{"type":"string","maxLength":255,"description":"The description of the dataset."}}}}}},"security":[{"default":[]}]}},"/datasets/{dataset_id}/datapoints":{"get":{"operationId":"datasets_list_datapoints","summary":"Datapoints","description":"Get datapoints for a dataset.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","description":"String ID of dataset. Starts with `evts_`.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataDatapointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"post":{"operationId":"datasets_create_datapoint","summary":"Create Datapoint","description":"Create a new datapoint for a dataset.\n\nHere in the v4 API, this has the following behaviour:\n* Retrieve the current latest version of the dataset.\n* Construct a new version of the dataset with the new testcases added.\n* Store that latest version as a committed version with an autogenerated commit\n  message and return the new datapoints","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","description":"String ID of dataset. Starts with `evts_`.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatapointResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/datasets_Request"}}}},"security":[{"default":[]}]}},"/evaluations/{id}":{"get":{"operationId":"evaluations_get","summary":"Get","description":"Get evaluation by ID.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","description":"String ID of evaluation run. Starts with `ev_`.","required":true,"schema":{"type":"string"}},{"name":"evaluator_aggregates","in":"query","description":"Whether to include evaluator aggregates in the response.","required":false,"schema":{"type":"boolean"}},{"name":"evaluatee_id","in":"query","description":"String ID of evaluatee version to return. If not defined, the first evaluatee will be returned. Starts with `evv_`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/evaluations/{id}/datapoints":{"get":{"operationId":"evaluations_list_datapoints","summary":"List Datapoints","description":"Get testcases by evaluation ID.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","description":"String ID of evaluation. Starts with `ev_`.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page to fetch. Starts from 1.","required":false,"schema":{"type":"integer","default":1}},{"name":"size","in":"query","description":"Number of evaluation results to retrieve.","required":false,"schema":{"type":"integer","default":10}},{"name":"evaluatee_id","in":"query","description":"String ID of evaluatee version to return. If not defined, the first evaluatee will be returned. Starts with `evv_`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataEvaluationDatapointSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/evaluations/{evaluation_id}/log":{"post":{"operationId":"evaluations_log","summary":"Log","description":"Log an external generation to an evaluation run for a datapoint.\n\nThe run must have status 'running'.","tags":["evaluations"],"parameters":[{"name":"evaluation_id","in":"path","description":"ID of the evaluation run. Starts with `evrun_`.","required":true,"schema":{"type":"string"}},{"name":"evaluatee_id","in":"query","description":"String ID of evaluatee version to return. If not defined, the first evaluatee will be returned. Starts with `evv_`.","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"datapoint_id":{"type":"string","description":"The datapoint for which a log was generated. Must be one of the datapoints in the dataset being evaluated."},"log":{"$ref":"#/components/schemas/LogRequest","description":"The log generated for the datapoint."}},"required":["datapoint_id","log"]}}}},"security":[{"default":[]}]}},"/evaluations/{evaluation_id}/result":{"post":{"operationId":"evaluations_result","summary":"Result","description":"Log an evaluation result to an evaluation run.\n\nThe run must have status 'running'. One of `result` or `error` must be provided.","tags":["evaluations"],"parameters":[{"name":"evaluation_id","in":"path","description":"ID of the evaluation run. Starts with `evrun_`.","required":true,"schema":{"type":"string"}},{"name":"evaluatee_id","in":"query","description":"String ID of evaluatee version to return. If not defined, the first evaluatee will be returned. Starts with `evv_`.","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"log_id":{"type":"string","description":"The log that was evaluated. Must have as its `source_datapoint_id` one of the datapoints in the dataset being evaluated."},"evaluator_id":{"type":"string","description":"ID of the evaluator that evaluated the log. Starts with `evfn_`. Must be one of the evaluator IDs associated with the evaluation run being logged to."},"result":{"$ref":"#/components/schemas/evaluations_CreateEvaluationResultLogRequestResult","description":"The result value of the evaluation."},"error":{"type":"string","description":"An error that occurred during evaluation."}},"required":["log_id","evaluator_id"]}}}},"security":[{"default":[]}]}},"/evaluations/{id}/status":{"patch":{"operationId":"evaluations_update_status","summary":"Update Status","description":"Update the status of an evaluation run.\n\nCan only be used to update the status of an evaluation run that uses external or human evaluators.\nThe evaluation must currently have status 'running' if switching to completed, or it must have status\n'completed' if switching back to 'running'.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","description":"String ID of evaluation run. Starts with `ev_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/EvaluationStatus","description":"The new status of the evaluation."}},"required":["status"]}}}},"security":[{"default":[]}]}},"/evaluations/{id}/evaluators":{"patch":{"operationId":"evaluations_add_evaluators","summary":"Add Evaluators","description":"Add evaluators to an existing evaluation run.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","description":"String ID of evaluation run. Starts with `ev_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"IDs of evaluators to add to the evaluation run. IDs start with `evfn_`"},"evaluator_version_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the evaluator versions to add to the evaluation run. IDs start with `evv_`"}}}}}},"security":[{"default":[]}]}},"/evaluations":{"get":{"operationId":"evaluations_list","summary":"Get Evaluations","description":"Get the evaluations associated with a project.\n\nSorting and filtering are supported through query params for categorical columns\nand the `created_at` timestamp.\n\nSorting is supported for the `dataset`, `config`, `status` and `evaluator-{evaluator_id}` columns.\nSpecify sorting with the `sort` query param, with values `{column}.{ordering}`.\nE.g. ?sort=dataset.asc&sort=status.desc will yield a multi-column sort. First by dataset then by status.\n\nFiltering is supported for the `id`, `dataset`, `config` and `status` columns.\n\nSpecify filtering with the `id_filter`, `dataset_filter`, `config_filter` and `status_filter` query params.\n\nE.g. ?dataset_filter=my_dataset&dataset_filter=my_other_dataset&status_filter=running\nwill only show rows where the dataset is \"my_dataset\" or \"my_other_dataset\", and where the status is \"running\".\n\nAn additional date range filter is supported for the `created_at` column. Use the `start_date` and `end_date`\nquery parameters to configure this.","tags":["evaluations"],"parameters":[{"name":"project_id","in":"query","description":"String ID of project. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"A list of evaluation run ids to filter on. Starts with `ev_`.","required":false,"schema":{"type":"string"}},{"name":"start_date","in":"query","description":"Only return evaluations created after this date.","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","description":"Only return evaluations created before this date.","required":false,"schema":{"type":"string","format":"date"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":50}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"evaluatee_id","in":"query","description":"String ID of evaluatee version to return. If not defined, the first evaluatee will be returned. Starts with `evv_`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/evaluators":{"get":{"operationId":"evaluators_list","summary":"List","description":"Get all evaluators within your organization.","tags":["evaluators"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatorResponse"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"post":{"operationId":"evaluators_create","summary":"Create","description":"Create an evaluator within your organization.","tags":["evaluators"],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the evaluator."},"description":{"type":"string","maxLength":255,"description":"The description of the evaluator."},"arguments_type":{"$ref":"#/components/schemas/EvaluatorArgumentsType","description":"Whether this evaluator is target-free or target-required."},"return_type":{"$ref":"#/components/schemas/EvaluatorReturnTypeEnum","description":"The type of the return value of the evaluator."},"code":{"type":"string","description":"The code for the evaluator. This code will be executed in a sandboxed environment."},"model_config":{"$ref":"#/components/schemas/ModelConfigCompletionRequest","description":"The model configuration used to generate."},"type":{"$ref":"#/components/schemas/EvaluatorType","description":"The type of the evaluator."}},"required":["name","description","arguments_type","return_type","type"]}}}},"security":[{"default":[]}]}},"/evaluators/{id}":{"get":{"operationId":"evaluators_get","summary":"Get","description":"Get an evaluator within your organization.","tags":["evaluators"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"delete":{"operationId":"evaluators_delete","summary":"Delete","description":"Delete an evaluator within your organization.","tags":["evaluators"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"patch":{"operationId":"evaluators_update","summary":"Update","description":"Update an evaluator within your organization.","tags":["evaluators"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the evaluator."},"description":{"type":"string","maxLength":255,"description":"The description of the evaluator."},"arguments_type":{"$ref":"#/components/schemas/EvaluatorArgumentsType","description":"Whether this evaluator is target-free or target-required."},"return_type":{"$ref":"#/components/schemas/EvaluatorReturnTypeEnum","description":"The type of the return value of the evaluator."},"code":{"type":"string","description":"The code for the evaluator. This code will be executed in a sandboxed environment."},"model_config":{"$ref":"#/components/schemas/ModelConfigCompletionRequest","description":"The model configuration used to generate."}}}}}},"security":[{"default":[]}]}},"/feedback":{"post":{"operationId":"feedback_feedback","summary":"Feedback","description":"Submit an array of feedback for existing `data_ids`","tags":["feedback"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/feedback_FeedbackFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/feedback_FeedbackFeedbackRequest"}}}},"security":[{"default":[]}]}},"/logs":{"get":{"operationId":"logs_list","summary":"List ","description":"Retrieve paginated logs from the server.\n\nSorting and filtering are supported through query params.\n\nSorting is supported for the `source`, `model`, `timestamp`, and `feedback-{output_name}` columns.\nSpecify sorting with the `sort` query param, with values `{column}.{ordering}`.\nE.g. ?sort=source.asc&sort=model.desc will yield a multi-column sort. First by source then by model.\n\nFiltering is supported for the `source`, `model`, `feedback-{output_name}`,\n`evaluator-{evaluator_external_id}` columns.\n\nSpecify filtering with the `source_filter`, `model_filter`, `feedback-{output.name}_filter` and\n`evaluator-{evaluator_external_id}_filter` query params.\n\nE.g. `?source_filter=AI&source_filter=user_1234&feedback-explicit_filter=good`\nwill only show rows where the source is \"AI\" or \"user_1234\", and where the latest feedback for the \"explicit\" output\ngroup is \"good\".\n\nAn additional date range filter is supported for the `Timestamp` column (i.e. `Log.created_at`).\nThese are supported through the `start_date` and `end_date` query parameters.\nThe date format could be either date: `YYYY-MM-DD`, e.g. 2024-01-01\nor datetime: YYYY-MM-DD[T]HH:MM[:SS[.ffffff]][Z or [±]HH[:]MM], e.g. 2024-01-01T00:00:00Z.\n\nSearching is supported for the model inputs and output.\nSpecify a search term with the `search` query param.\nE.g. `?search=hello%20there` will cause a case-insensitive search across model inputs and output.","tags":["logs"],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"metadata_search","in":"query","required":false,"schema":{"type":"string"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":50}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"post":{"operationId":"logs_log","summary":"Log","description":"Log a datapoint or array of datapoints to your Humanloop project.","tags":["logs"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/logs_LogsLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/logs_LogsLogRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"logs_delete","summary":"Delete","tags":["logs"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"patch":{"operationId":"logs_update_by_ref","summary":"Update By Reference","description":"Update a logged datapoint by its reference ID.\n\nThe `reference_id` query parameter must be provided, and refers to the\n`reference_id` of a previously-logged datapoint.","tags":["logs"],"parameters":[{"name":"reference_id","in":"query","description":"A unique string to reference the datapoint. Identifies the logged datapoint created with the same `reference_id`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLogRequest"}}}},"security":[{"default":[]}]}},"/logs/{id}":{"get":{"operationId":"logs_get","summary":"Get","description":"Retrieve a log by log id.","tags":["logs"],"parameters":[{"name":"id","in":"path","description":"String ID of log to return. Starts with `data_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"patch":{"operationId":"logs_update","summary":"Update","description":"Update a logged datapoint in your Humanloop project.","tags":["logs"],"parameters":[{"name":"id","in":"path","description":"String ID of logged datapoint to return. Starts with `data_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLogRequest"}}}},"security":[{"default":[]}]}},"/model-configs":{"post":{"operationId":"modelConfigs_register","summary":"Register","description":"Register a model config to a project.\n\nIf the project name provided does not exist, a new project will be created\nautomatically.\n\nIf the model config is the first to be associated to the project, it will\nbe set as the active model config.","tags":["modelConfigs"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/modelConfigs_ProjectModelConfigRequestStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/modelConfigs_ProjectModelConfigRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"project":{"type":"string","description":"Unique project name. If it does not exist, a new project will be created."},"project_id":{"type":"string","description":"Unique project ID"},"prompt_template":{"type":"string","description":"Prompt template that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: `{{input_name}}`."},"chat_template":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: `{{input_name}}`."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"Which of the providers model endpoints to use. For example Complete or Edit."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/modelConfigs_ProjectModelConfigRequestToolsItem"},"description":"Make tools available to OpenAIs chat model as functions."}},"required":["model"]}}}},"security":[{"default":[]}]}},"/model-configs/{id}":{"get":{"operationId":"modelConfigs_get","summary":"Get","description":"Get a specific model config by ID.","tags":["modelConfigs"],"parameters":[{"name":"id","in":"path","description":"String ID of the model config. Starts with `config_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/model-configs/{id}/export":{"post":{"operationId":"modelConfigs_export","summary":"Export by ID","description":"Export a model config to a .prompt file by ID.","tags":["modelConfigs"],"parameters":[{"name":"id","in":"path","description":"String ID of the model config. Starts with `config_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/model-configs/serialize":{"post":{"operationId":"modelConfigs_serialize","summary":"Serialize","description":"Serialize a model config to a .prompt file format.","tags":["modelConfigs"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/modelConfigs_ModelConfigsSerializeRequest"}}}},"security":[{"default":[]}]}},"/model-configs/deserialize":{"post":{"operationId":"modelConfigs_deserialize","summary":"Deserialize","description":"Deserialize a model config from a .prompt file format.","tags":["modelConfigs"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"string"}},"required":["config"]}}}},"security":[{"default":[]}]}},"/sessions":{"get":{"operationId":"sessions_list","summary":"List ","description":"Get a page of sessions.","tags":["sessions"],"parameters":[{"name":"project_id","in":"query","description":"String ID of project to return sessions for. Sessions that contain any datapoints associated to this project will be returned. Starts with `pr_`.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page to fetch. Starts from 1.","required":false,"schema":{"type":"integer","default":1}},{"name":"size","in":"query","description":"Number of sessions to retrieve.","required":false,"schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDataSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]},"post":{"operationId":"sessions_create","summary":"Create","description":"Create a new session.\n\nReturns a session ID that can be used to log datapoints to the session.","tags":["sessions"],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}},"/sessions/{id}":{"get":{"operationId":"sessions_get","summary":"Get","description":"Get a session by ID.","tags":["sessions"],"parameters":[{"name":"id","in":"path","description":"String ID of session to return. Starts with `sesh_`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"default":[]}]}}},"tags":[{"name":"chats"},{"name":"completions"},{"name":"datapoints"},{"name":"projects"},{"name":"projects > activeConfig"},{"name":"projects > deployedConfig"},{"name":"datasets"},{"name":"evaluations"},{"name":"evaluators"},{"name":"feedback"},{"name":"logs"},{"name":"modelConfigs"},{"name":"sessions"}],"servers":[{"url":"https://api.humanloop.com/v4","description":"Default"}],"components":{"schemas":{"ProviderApiKeys":{"type":"object","properties":{"openai":{"type":"string"},"mock":{"type":"string"},"anthropic":{"type":"string"},"deepseek":{"type":"string"},"bedrock":{"type":"string"},"cohere":{"type":"string"},"openai_azure":{"type":"string"},"openai_azure_endpoint":{"type":"string"},"google":{"type":"string"}},"title":"ProviderApiKeys"},"TemplateLanguage":{"type":"string","enum":["default","jinja"],"description":"Template engine to use for rendering templates.","title":"TemplateLanguage"},"ImageUrlDetail":{"type":"string","enum":["high","low","auto"],"description":"Specify the detail level of the image provided to the model. For more details see: https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding","title":"ImageUrlDetail"},"ImageUrl":{"type":"object","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data."},"detail":{"$ref":"#/components/schemas/ImageUrlDetail","description":"Specify the detail level of the image provided to the model. For more details see: https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding"}},"required":["url"],"title":"ImageUrl"},"ChatMessageWithToolCallContentItem":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"text":{"type":"string","description":"The message's text content."}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"],"description":"Discriminator value: image_url"},"image_url":{"$ref":"#/components/schemas/ImageUrl","description":"The message's image content."}},"required":["type","image_url"]}],"discriminator":{"propertyName":"type"},"title":"ChatMessageWithToolCallContentItem"},"Content":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCallContentItem"}}],"description":"The content of the message.","title":"Content"},"ChatRole":{"type":"string","enum":["user","assistant","system","tool","developer"],"description":"An enumeration.","title":"ChatRole"},"ToolType":{"type":"string","enum":["function"],"description":"The type of tool to call.","title":"ToolType"},"FunctionTool":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name"],"description":"A function tool to be called by the model where user owns runtime.","title":"FunctionTool"},"ToolCall":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/ToolType"},"function":{"$ref":"#/components/schemas/FunctionTool"}},"required":["id","type","function"],"description":"A tool call to be made.","title":"ToolCall"},"ChatMessageWithToolCallThinkingItem":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking"],"description":"Discriminator value: thinking"},"thinking":{"type":"string","description":"Model's chain-of-thought for providing the response."},"signature":{"type":"string","description":"Cryptographic signature that verifies the thinking block was generated by Anthropic."}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"],"description":"Discriminator value: redacted_thinking"},"data":{"type":"string","description":"Thinking block Anthropic redacted for safety reasons. User is expected to pass the block back to Anthropic"}},"required":["type","data"]}],"discriminator":{"propertyName":"type"},"title":"ChatMessageWithToolCallThinkingItem"},"ChatMessageWithToolCall":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/Content","description":"The content of the message."},"name":{"type":"string","description":"Optional name of the message author."},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to."},"role":{"$ref":"#/components/schemas/ChatRole","description":"Role of the message author."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"},"description":"A list of tool calls requested by the assistant."},"thinking":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCallThinkingItem"},"description":"Model's chain-of-thought for providing the response. Present on assistant messages if model supports it."},"tool_call":{"$ref":"#/components/schemas/FunctionTool","description":"NB: Deprecated in favour of tool_calls. A tool call requested by the assistant.","deprecated":true}},"required":["role"],"title":"ChatMessageWithToolCall"},"FunctionToolChoice":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"description":"A function tool to be called by the model where user owns runtime.","title":"FunctionToolChoice"},"ToolChoice":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolType"},"function":{"$ref":"#/components/schemas/FunctionToolChoice"}},"required":["type","function"],"description":"Tool choice to force the model to use a tool.","title":"ToolChoice"},"chats_ChatsCreateRequestToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatsCreateRequestToolChoice"},"chats_ChatsCreateRequestToolCall":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","title":"ChatsCreateRequestToolCall"},"Type":{"type":"string","enum":["json_object","json_schema"],"title":"Type"},"ResponseFormat":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/Type"},"json_schema":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The JSON schema of the response format if type is json_schema."}},"required":["type"],"description":"Response format of the model.","title":"ResponseFormat"},"OpenAIReasoningEffort":{"type":"string","enum":["high","medium","low"],"description":"Supported reasoning effort.","title":"OpenAIReasoningEffort"},"chats_ChatsCreateRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ChatsCreateRequestReasoningEffort"},"ModelProviders":{"type":"string","enum":["anthropic","bedrock","cohere","deepseek","google","groq","mock","openai","openai_azure","replicate"],"description":"Supported model providers.","title":"ModelProviders"},"ModelConfigChatRequestStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.","title":"ModelConfigChatRequestStop"},"ModelConfigChatRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ModelConfigChatRequestReasoningEffort"},"ModelEndpoints":{"type":"string","enum":["complete","chat","edit"],"description":"Supported model provider endpoints.","title":"ModelEndpoints"},"LinkedToolRequest":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the linked tool. Starts with \"oc_\""},"source":{"type":"string","enum":["organization"],"description":"The source of the linked tool. For a linked tool it should be `organization`"},"name":{"type":"string","description":"The name of the linked tool."},"description":{"type":"string","description":"The description of the linked tool."},"strict":{"type":"boolean","description":"Whether the tool is strict or not. If strict, the model will be forced to respond with JSON matching the parameters schema."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The parameters of the linked tool."}},"required":["id","source"],"title":"LinkedToolRequest"},"ToolSource":{"type":"string","enum":["organization","inline"],"description":"Source of tool. Used to differentiate between tools and tool versions when they are combined in a list.\n\nV4 uses organization and inline. Those are deprecated and will be removed in favour of tool and tool_version.","title":"ToolSource"},"ModelConfigToolRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tool shown to the model."},"description":{"type":"string","description":"The description of the tool shown to the model."},"strict":{"type":"boolean","description":"Whether the tool is strict or not. If strict, the model will be forced to respond with JSON matching the parameters schema."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"source":{"$ref":"#/components/schemas/ToolSource","description":"Source of the tool. If defined at an organization level will be 'organization' else 'inline'."},"source_code":{"type":"string","description":"Code source of the tool."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"preset_name":{"type":"string","description":"If is_preset = true, this is the name of the preset tool on Humanloop. This is used as the key to look up the Humanloop runtime of the tool"}},"required":["name"],"description":"Definition of tool within a model config.\n\nThe subset of ToolConfig parameters received by the chat endpoint.\nDoes not have things like the signature or setup schema.","title":"ModelConfigToolRequest"},"ModelConfigChatRequestToolsItem":{"oneOf":[{"$ref":"#/components/schemas/LinkedToolRequest"},{"$ref":"#/components/schemas/ModelConfigToolRequest"}],"title":"ModelConfigChatRequestToolsItem"},"ModelConfigChatRequest":{"type":"object","properties":{"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/ModelConfigChatRequestStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/ModelConfigChatRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"The provider model endpoint used."},"chat_template":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. Input variables within the template should be specified with syntax: `{{input_name}}`."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ModelConfigChatRequestToolsItem"},"description":"Make tools available to OpenAIs chat model as functions."}},"required":["model"],"description":"Chat model config request.","title":"ModelConfigChatRequest"},"ToolResultResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"signature":{"type":"string"},"result":{"type":"string"}},"required":["id","name","signature","result"],"description":"A result from a tool used to populate the prompt template","title":"ToolResultResponse"},"ChatDataResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the model inputs and output logged to Humanloop. Use this when recording feedback later."},"index":{"type":"integer","description":"The index for the sampled generation for a given input. The num_samples request parameter controls how many samples are generated."},"output":{"type":"string","description":"Output text returned from the provider model with leading and trailing whitespaces stripped."},"raw_output":{"type":"string","description":"Raw output text returned from the provider model."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the chat template."},"finish_reason":{"type":"string","description":"Why the generation ended. One of 'stop' (indicating a stop token was encountered), or 'length' (indicating the max tokens limit has been reached), or 'tool_call' (indicating that the model has chosen to call a tool - in which case the tool_call parameter of the response will be populated). It will be set as null for the intermediary responses during a stream, and will only be set as non-null for the final streamed token."},"model_config_id":{"type":"string","description":"The model configuration used to create the generation."},"tool_results":{"type":"array","items":{"$ref":"#/components/schemas/ToolResultResponse"},"description":"Results of any tools run during the generation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The messages passed to the to provider chat endpoint."},"tool_call":{"$ref":"#/components/schemas/FunctionTool","description":"Deprecated: Please use tool_calls field within the output_message.JSON definition of the tool to call and the corresponding argument values. Will be populated when finish_reason='tool_call'.","deprecated":true},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCall"},"description":"Deprecated: Please use tool_calls field within the output_message.JSON definition of the tools to call and the corresponding argument values. Will be populated when finish_reason='tool_call'."},"output_message":{"$ref":"#/components/schemas/ChatMessageWithToolCall","description":"The message returned by the provider."}},"required":["id","index","output","raw_output","model_config_id","output_message"],"description":"Overwrite DataResponse for chat.","title":"ChatDataResponse"},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Number of tokens used in the prompt."},"generation_tokens":{"type":"integer","description":"Number of tokens produced by the generation."},"total_tokens":{"type":"integer","description":"Total number of tokens used by the prompt and generation combined."},"reasoning_tokens":{"type":"integer","description":"Number of tokens used for model used to 'think' before creating a response to the prompt. "}},"required":["prompt_tokens","generation_tokens","total_tokens"],"title":"Usage"},"ChatResponseToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatResponseToolChoice"},"ChatResponse":{"type":"object","properties":{"project_id":{"type":"string","description":"Unique identifier of the parent project. Will not be provided if the request was made without providing a project name or id"},"num_samples":{"type":"integer","default":1,"description":"The number of chat responses."},"logprobs":{"type":"integer","description":"Include the log probabilities of the top n tokens in the provider_response"},"suffix":{"type":"string","description":"The suffix that comes after a completion of inserted text. Useful for completions that act like inserts."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatDataResponse"},"description":"Array containing the chat responses."},"usage":{"$ref":"#/components/schemas/Usage","description":"Counts of the number of tokens used and related stats."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"provider_responses":{"type":"array","items":{"description":"Any type"},"description":"The raw responses returned by the model provider."},"provider_request":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The raw request sent to the model provider."},"session_id":{"type":"string","description":"ID of the session if it belongs to one."},"tool_choice":{"$ref":"#/components/schemas/ChatResponseToolChoice","description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function."}},"required":["data","provider_responses"],"description":"Overwrite GenerateResponse for chat.","title":"ChatResponse"},"ValidationErrorLocItem":{"oneOf":[{"type":"string"},{"type":"integer"}],"title":"ValidationErrorLocItem"},"ValidationError":{"type":"object","properties":{"loc":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorLocItem"}},"msg":{"type":"string"},"type":{"type":"string"}},"required":["loc","msg","type"],"title":"ValidationError"},"HTTPValidationError":{"type":"object","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}},"title":"HTTPValidationError"},"chats_ChatsCreateStreamRequestToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatsCreateStreamRequestToolChoice"},"chats_ChatsCreateStreamRequestToolCall":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","title":"ChatsCreateStreamRequestToolCall"},"chats_ChatsCreateStreamRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ChatsCreateStreamRequestReasoningEffort"},"chats_ChatsCreateDeployedRequestToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatsCreateDeployedRequestToolChoice"},"chats_ChatsCreateDeployedRequestToolCall":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","title":"ChatsCreateDeployedRequestToolCall"},"chats_ChatsCreateDeployedRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ChatsCreateDeployedRequestReasoningEffort"},"chats_ChatsCreateDeployedStreamRequestToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatsCreateDeployedStreamRequestToolChoice"},"chats_ChatsCreateDeployedStreamRequestToolCall":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","title":"ChatsCreateDeployedStreamRequestToolCall"},"chats_ChatsCreateDeployedStreamRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ChatsCreateDeployedStreamRequestReasoningEffort"},"chats_ChatsCreateConfigRequestToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatsCreateConfigRequestToolChoice"},"chats_ChatsCreateConfigRequestToolCall":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","title":"ChatsCreateConfigRequestToolCall"},"chats_ChatsCreateConfigRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ChatsCreateConfigRequestReasoningEffort"},"chats_ChatsCreateConfigStreamRequestToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"ChatsCreateConfigStreamRequestToolChoice"},"chats_ChatsCreateConfigStreamRequestToolCall":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.","title":"ChatsCreateConfigStreamRequestToolCall"},"chats_ChatsCreateConfigStreamRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ChatsCreateConfigStreamRequestReasoningEffort"},"ModelConfigCompletionRequestStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.","title":"ModelConfigCompletionRequestStop"},"ModelConfigCompletionRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ModelConfigCompletionRequestReasoningEffort"},"ModelConfigCompletionRequest":{"type":"object","properties":{"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/ModelConfigCompletionRequestStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/ModelConfigCompletionRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"The provider model endpoint used."},"prompt_template":{"type":"string","description":"Prompt template that will take your specified inputs to form your final request to the model. Input variables within the prompt template should be specified with syntax: `{{input_name}}`."}},"required":["model"],"description":"Completion model config request","title":"ModelConfigCompletionRequest"},"DataResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the model inputs and output logged to Humanloop. Use this when recording feedback later."},"index":{"type":"integer","description":"The index for the sampled generation for a given input. The num_samples request parameter controls how many samples are generated."},"output":{"type":"string","description":"Output text returned from the provider model with leading and trailing whitespaces stripped."},"raw_output":{"type":"string","description":"Raw output text returned from the provider model."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"finish_reason":{"type":"string","description":"Why the generation ended. One of 'stop' (indicating a stop token was encountered), or 'length' (indicating the max tokens limit has been reached), or 'tool_call' (indicating that the model has chosen to call a tool - in which case the tool_call parameter of the response will be populated). It will be set as null for the intermediary responses during a stream, and will only be set as non-null for the final streamed token."},"model_config_id":{"type":"string","description":"The model configuration used to create the generation."},"tool_results":{"type":"array","items":{"$ref":"#/components/schemas/ToolResultResponse"},"description":"Results of any tools run during the generation."}},"required":["id","index","output","raw_output","inputs","model_config_id"],"title":"DataResponse"},"CompletionResponse":{"type":"object","properties":{"project_id":{"type":"string","description":"Unique identifier of the parent project. Will not be provided if the request was made without providing a project name or id"},"num_samples":{"type":"integer","default":1,"description":"How many completions to make for each set of inputs."},"logprobs":{"type":"integer","description":"Include the log probabilities of the top n tokens in the provider_response"},"suffix":{"type":"string","description":"The suffix that comes after a completion of inserted text. Useful for completions that act like inserts."},"user":{"type":"string","description":"End-user ID passed through to provider call."},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataResponse"},"description":"Array containing the generation responses."},"usage":{"$ref":"#/components/schemas/Usage","description":"Counts of the number of tokens used and related stats."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"provider_responses":{"type":"array","items":{"description":"Any type"},"description":"The raw responses returned by the model provider."},"provider_request":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The raw request sent to the model provider."},"session_id":{"type":"string","description":"ID of the session if it belongs to one."}},"required":["data","provider_responses"],"title":"CompletionResponse"},"DatapointResponseTargetValue":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"array","items":{"description":"Any type"}},{"type":"object","additionalProperties":{"description":"Any type"}}],"title":"DatapointResponseTargetValue"},"DatapointResponse":{"type":"object","properties":{"id":{"type":"string"},"dataset_id":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"type":"string"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"}},"target":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DatapointResponseTargetValue"}}},"required":["id"],"title":"DatapointResponse"},"DatasetResponse":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string","description":"Datasets are now files and do not belong to projects. If this dataset was created before that change, the legacy project ID will be provided here, otherwise an empty string will be returned.","deprecated":true},"name":{"type":"string"},"description":{"type":"string"},"datapoint_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","project_id","name","datapoint_count","created_at","updated_at"],"title":"DatasetResponse"},"EvaluationStatus":{"type":"string","enum":["pending","running","completed","cancelled"],"description":"Status of an evaluation.","title":"EvaluationStatus"},"ModelConfigResponseStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.","title":"ModelConfigResponseStop"},"ModelConfigResponseReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ModelConfigResponseReasoningEffort"},"UserResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of user. Starts with `usr_`."},"email_address":{"type":"string","description":"The user's email address."},"full_name":{"type":"string","description":"The user's full name."},"verified":{"type":"boolean","description":"Whether the user has verified their email address."}},"required":["id","email_address","verified"],"title":"UserResponse"},"ToolConfigResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"created_by":{"$ref":"#/components/schemas/UserResponse","description":"The user who created the config."},"status":{"type":"string","description":"Whether the config is committed or not."},"name":{"type":"string","description":"Name for the tool referenced by the model."},"description":{"type":"string","description":"Description of the tool referenced by the model"},"source":{"$ref":"#/components/schemas/ToolSource","description":"Source of the tool. If defined at an organization level will be 'organization' else 'inline'."},"source_code":{"type":"string","description":"Code source of the tool."},"setup_schema":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"signature":{"type":"string","description":"The function signature of the tool when being called."},"is_preset":{"type":"boolean","description":"Whether the tool is one where Humanloop defines runtime or not."},"preset_name":{"type":"string","description":"If is_preset = true, this is the name of the preset tool on Humanloop. This is used as the key to lookup the Humanloop runtime of the tool"}},"required":["id","status","name"],"title":"ToolConfigResponse"},"ToolResponse":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool. Starts with either `config_` or `oc_`."},"name":{"type":"string","description":"Name for the tool referenced by the model."},"description":{"type":"string","description":"Description of the tool referenced by the model"},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"source":{"type":"string","description":"The origin of the tool"}},"required":["id","name"],"title":"ToolResponse"},"ModelConfigResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/ModelConfigResponseStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/ModelConfigResponseReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"prompt_template":{"type":"string","description":"Prompt template that will take your specified inputs to form your final request to the model. NB: Input variables within the prompt template should be specified with syntax: `{{input_name}}`."},"chat_template":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the template should be specified with syntax: `{{input_name}}`."},"tool_configs":{"type":"array","items":{"$ref":"#/components/schemas/ToolConfigResponse"},"description":"NB: Deprecated with tools field. Definition of tools shown to the model.","deprecated":true},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolResponse"},"description":"Tools shown to the model."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"The provider model endpoint used."}},"required":["id","model"],"description":"Model config request.\n\nContains fields that are common to all (i.e. both chat and complete) endpoints.","title":"ModelConfigResponse"},"EvaluatorArgumentsType":{"type":"string","enum":["target_free","target_required"],"description":"Enum representing the possible argument types of an evaluator.","title":"EvaluatorArgumentsType"},"EvaluatorReturnTypeEnum":{"type":"string","enum":["boolean","number","select","multi_select","text"],"description":"Enum representing the possible return types of an evaluator.","title":"EvaluatorReturnTypeEnum"},"ToolConfigRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tool shown to the model."},"description":{"type":"string","description":"The description of the tool shown to the model."},"strict":{"type":"boolean","description":"Whether the tool is strict or not. If strict, the model will be forced to respond with JSON matching the parameters schema."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"source":{"$ref":"#/components/schemas/ToolSource","description":"Source of the tool. If defined at an organization level will be 'organization' else 'inline'."},"source_code":{"type":"string","description":"Code source of the tool."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"preset_name":{"type":"string","description":"If is_preset = true, this is the name of the preset tool on Humanloop. This is used as the key to look up the Humanloop runtime of the tool"}},"required":["name"],"description":"Definition of tool within a model config.\n\nThe subset of ToolConfig parameters received by the chat endpoint.\nDoes not have things like the signature or setup schema.","title":"ToolConfigRequest"},"ModelConfigRequestStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.","title":"ModelConfigRequestStop"},"ModelConfigRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ModelConfigRequestReasoningEffort"},"ModelConfigRequestToolsItem":{"oneOf":[{"$ref":"#/components/schemas/LinkedToolRequest"},{"$ref":"#/components/schemas/ModelConfigToolRequest"}],"title":"ModelConfigRequestToolsItem"},"ModelConfigRequest":{"type":"object","properties":{"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/ModelConfigRequestStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/ModelConfigRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"The provider model endpoint used."},"prompt_template":{"type":"string","description":"Prompt template that will take your specified inputs to form your final request to the model. Input variables within the prompt template should be specified with syntax: `{{input_name}}`."},"chat_template":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. Input variables within the template should be specified with syntax: `{{input_name}}`."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ModelConfigRequestToolsItem"},"description":"Make tools available to OpenAIs chat model as functions."}},"required":["model"],"description":"Model config used for logging both chat and completion.","title":"ModelConfigRequest"},"ConfigResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["model"],"description":"Discriminator value: model"},"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/ModelConfigResponseStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/ModelConfigResponseReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"prompt_template":{"type":"string","description":"Prompt template that will take your specified inputs to form your final request to the model. NB: Input variables within the prompt template should be specified with syntax: `{{input_name}}`."},"chat_template":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the template should be specified with syntax: `{{input_name}}`."},"tool_configs":{"type":"array","items":{"$ref":"#/components/schemas/ToolConfigResponse"},"description":"NB: Deprecated with tools field. Definition of tools shown to the model.","deprecated":true},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolResponse"},"description":"Tools shown to the model."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"The provider model endpoint used."}},"required":["type","id","model"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool"],"description":"Discriminator value: tool"},"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"created_by":{"$ref":"#/components/schemas/UserResponse","description":"The user who created the config."},"status":{"type":"string","description":"Whether the config is committed or not."},"name":{"type":"string","description":"Name for the tool referenced by the model."},"description":{"type":"string","description":"Description of the tool referenced by the model"},"source":{"$ref":"#/components/schemas/ToolSource","description":"Source of the tool. If defined at an organization level will be 'organization' else 'inline'."},"source_code":{"type":"string","description":"Code source of the tool."},"setup_schema":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"signature":{"type":"string","description":"The function signature of the tool when being called."},"is_preset":{"type":"boolean","description":"Whether the tool is one where Humanloop defines runtime or not."},"preset_name":{"type":"string","description":"If is_preset = true, this is the name of the preset tool on Humanloop. This is used as the key to lookup the Humanloop runtime of the tool"}},"required":["type","id","status","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["evaluator"],"description":"Discriminator value: evaluator"},"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"created_by":{"$ref":"#/components/schemas/UserResponse","description":"The user who created the config."},"status":{"type":"string","description":"Whether the config is committed or not."},"name":{"type":"string","description":"Name of config."},"description":{"type":"string","description":"Description of config."},"evaluator_type":{"type":"string","description":"Type of evaluator."},"model_config":{"$ref":"#/components/schemas/ModelConfigResponse","description":"The model config defining the LLM evaluator."},"code":{"type":"string","description":"The code for the evaluator. This code will be executed in a sandboxed environment."},"arguments_type":{"$ref":"#/components/schemas/EvaluatorArgumentsType","description":"Whether this evaluator is target-free or target-required."},"return_type":{"$ref":"#/components/schemas/EvaluatorReturnTypeEnum","description":"The type of the return value of the evaluator."}},"required":["type","id","status","name","evaluator_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent"],"description":"Discriminator value: agent"},"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"created_by":{"$ref":"#/components/schemas/UserResponse","description":"The user who created the config."},"status":{"type":"string","description":"Whether the config is committed or not."},"name":{"type":"string","description":"Name of config."},"description":{"type":"string","description":"Description of config."},"agent_class":{"type":"string","description":"Class of the agent."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolConfigRequest"},"description":"Tools associated with the agent."},"model_config":{"$ref":"#/components/schemas/ModelConfigRequest","description":"Model config associated with the agent."}},"required":["type","id","status","name","agent_class","model_config"]},{"type":"object","properties":{"type":{"type":"string","enum":["generic"],"description":"Discriminator value: generic"},"id":{"type":"string","description":"String ID of config. Starts with `config_`."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"created_by":{"$ref":"#/components/schemas/UserResponse","description":"The user who created the config."},"status":{"type":"string","description":"Whether the config is committed or not."},"name":{"type":"string","description":"Name of config."},"description":{"type":"string","description":"Description of config."}},"required":["type","id","status","name"]}],"discriminator":{"propertyName":"type"},"title":"ConfigResponse"},"EvaluatorType":{"type":"string","enum":["python","llm","human","external"],"description":"An enumeration.","title":"EvaluatorType"},"ModelConfigEvaluatorAggregateResponse":{"type":"object","properties":{"model_config_id":{"type":"string"},"evaluator_id":{"type":"string"},"evaluator_version_id":{"type":"string"},"aggregate_value":{"type":"number","format":"double"}},"required":["model_config_id","evaluator_id","evaluator_version_id"],"title":"ModelConfigEvaluatorAggregateResponse"},"ProjectConfigResponse":{"type":"object","properties":{"project_id":{"type":"string","description":"String ID of project the model config belongs to. Starts with `pr_`."},"project_name":{"type":"string","description":"Name of the project the model config belongs to."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_used":{"type":"string","format":"date-time"},"num_datapoints":{"type":"integer","description":"Number of datapoints associated with this project model config."},"evaluation_aggregates":{"type":"array","items":{"$ref":"#/components/schemas/ModelConfigEvaluatorAggregateResponse"},"description":"Aggregates of evaluators for the model config."},"config":{"$ref":"#/components/schemas/ConfigResponse"}},"required":["project_id","project_name","created_at","updated_at","last_used","config"],"title":"ProjectConfigResponse"},"ProjectUserResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of user. Starts with `usr_`."},"email_address":{"type":"string","description":"The user's email address."},"full_name":{"type":"string","description":"The user's full name."}},"required":["id","email_address"],"title":"ProjectUserResponse"},"FeedbackType":{"type":"string","enum":["rating","action","issue","correction","comment"],"description":"An enumeration.","title":"FeedbackType"},"FeedbackTypeModelType":{"oneOf":[{"$ref":"#/components/schemas/FeedbackType"},{"type":"string"}],"description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'.","title":"FeedbackTypeModelType"},"LabelSentiment":{"type":"string","enum":["positive","negative","neutral","unset"],"description":"How a label should be treated in calculating Version performance.\n\nUsed by a File's PAPV (Positive Action Per View) metric.","title":"LabelSentiment"},"CategoricalFeedbackLabel":{"type":"object","properties":{"value":{"type":"string"},"sentiment":{"$ref":"#/components/schemas/LabelSentiment","description":"Whether the feedback sentiment is positive or negative."}},"required":["value","sentiment"],"title":"CategoricalFeedbackLabel"},"FeedbackTypeModel":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FeedbackTypeModelType","description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'."},"values":{"type":"array","items":{"$ref":"#/components/schemas/CategoricalFeedbackLabel"},"description":"The allowed values for categorical feedback types. Not populated for `correction` and `comment`."}},"required":["type"],"title":"FeedbackTypeModel"},"FeedbackTypes":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackTypeModel"},"title":"FeedbackTypes"},"ConfigType":{"type":"string","enum":["generic","model","tool","agent","evaluator"],"description":"An enumeration.","title":"ConfigType"},"ProjectResponse":{"type":"object","properties":{"id":{"type":"string","description":"Project ID"},"name":{"type":"string","description":"Unique project name."},"active_config":{"$ref":"#/components/schemas/ProjectConfigResponse","description":"Config that has been set as the project's active deployment."},"users":{"type":"array","items":{"$ref":"#/components/schemas/ProjectUserResponse"},"description":"Users associated to the project."},"data_count":{"type":"integer","description":"The count of datapoints that have been logged to the project."},"feedback_types":{"$ref":"#/components/schemas/FeedbackTypes","description":"The feedback types that have been defined in the project."},"team_id":{"type":"string","description":"Unique ID of the team the project belongs to. Starts with `tm_`."},"config_type":{"$ref":"#/components/schemas/ConfigType"},"active_evaluators":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatorResponse"},"description":"Evaluators that have been set as active for the project."},"directory_id":{"type":"string","description":"String ID of the directory the project belongs to. Starts with `dir_`."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","users","data_count","feedback_types","team_id","created_at","updated_at"],"title":"ProjectResponse"},"EvaluatorResponse":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the evaluator."},"description":{"type":"string","maxLength":255,"description":"The description of the evaluator."},"arguments_type":{"$ref":"#/components/schemas/EvaluatorArgumentsType","description":"Whether this evaluator is target-free or target-required."},"return_type":{"$ref":"#/components/schemas/EvaluatorReturnTypeEnum","description":"The type of the return value of the evaluator."},"code":{"type":"string","description":"The code for the evaluator. This code will be executed in a sandboxed environment."},"model_config":{"$ref":"#/components/schemas/ModelConfigResponse","description":"The model config defining the LLM evaluator."},"type":{"$ref":"#/components/schemas/EvaluatorType","description":"The type of the evaluator."},"id":{"type":"string","description":"Unique ID for the evaluator. Starts with `evfn_`."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"logging_project":{"$ref":"#/components/schemas/ProjectResponse","description":"The project where the evaluator logs are stored."}},"required":["name","description","arguments_type","return_type","type","id","created_at","updated_at"],"title":"EvaluatorResponse"},"EvaluationResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the evaluation. Starts with `ev_`."},"status":{"$ref":"#/components/schemas/EvaluationStatus"},"config":{"$ref":"#/components/schemas/ConfigResponse"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"evaluators":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatorResponse"}},"dataset":{"$ref":"#/components/schemas/DatasetResponse"},"dataset_version_id":{"type":"string"},"dataset_snapshot":{"$ref":"#/components/schemas/DatasetResponse"},"evaluator_aggregates":{"type":"array","items":{"$ref":"#/components/schemas/ModelConfigEvaluatorAggregateResponse"}}},"required":["id","status","config","created_at","updated_at","evaluators","dataset","dataset_version_id"],"title":"EvaluationResponse"},"FileSortBy":{"type":"string","enum":["created_at","updated_at","name"],"description":"An enumeration.","title":"FileSortBy"},"SortOrder":{"type":"string","enum":["asc","desc"],"description":"An enumeration.","title":"SortOrder"},"PaginatedDataProjectResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"}},"page":{"type":"integer"},"size":{"type":"integer"},"total":{"type":"integer"}},"required":["records","page","size","total"],"title":"PaginatedDataProjectResponse"},"FeedbackClass":{"type":"string","enum":["select","multi_select","text","number"],"description":"An enumeration.","title":"FeedbackClass"},"FeedbackLabelRequest":{"type":"object","properties":{"value":{"type":"string"},"sentiment":{"$ref":"#/components/schemas/LabelSentiment"}},"required":["value"],"title":"FeedbackLabelRequest"},"Judgment":{"oneOf":[{"type":"boolean"},{"type":"number","format":"double"},{"type":"array","items":{"type":"string"}},{"type":"string"}],"title":"Judgment"},"FeedbackResponseType":{"oneOf":[{"$ref":"#/components/schemas/FeedbackType"},{"type":"string"}],"description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'.","title":"FeedbackResponseType"},"FeedbackResponseValue":{"oneOf":[{"type":"boolean"},{"type":"number","format":"double"},{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"The feedback value to set. This would be the appropriate text for 'correction' or 'comment', or a label to apply for 'rating', 'action', or 'issue'.","title":"FeedbackResponseValue"},"FeedbackResponse":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FeedbackResponseType","description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'."},"value":{"$ref":"#/components/schemas/FeedbackResponseValue","description":"The feedback value to set. This would be the appropriate text for 'correction' or 'comment', or a label to apply for 'rating', 'action', or 'issue'."},"data_id":{"type":"string","description":"ID to associate the feedback to a previously logged datapoint."},"user":{"type":"string","description":"A unique identifier to who provided the feedback."},"created_at":{"type":"string","format":"date-time","description":"User defined timestamp for when the feedback was created. "},"id":{"type":"string","description":"String ID of user feedback. Starts with `ann_`, short for annotation."}},"required":["type","id"],"title":"FeedbackResponse"},"LogResponseToolChoice":{"oneOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["auto"]},{"type":"string","enum":["required"]},{"$ref":"#/components/schemas/ToolChoice"}],"description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.","title":"LogResponseToolChoice"},"Value":{"oneOf":[{"type":"boolean"},{"type":"number","format":"double"},{"type":"string"},{"type":"array","items":{"type":"string"}}],"title":"Value"},"EvaluationResultResponse":{"type":"object","properties":{"id":{"type":"string"},"evaluator_id":{"type":"string"},"evaluator_version_id":{"type":"string"},"evaluation_id":{"type":"string"},"log_id":{"type":"string"},"log":{"$ref":"#/components/schemas/LogResponse"},"version_id":{"type":"string"},"version":{"description":"Any type"},"value":{"$ref":"#/components/schemas/Value"},"error":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"evaluator_log":{"$ref":"#/components/schemas/LogResponse"}},"required":["id","evaluator_id","evaluator_version_id","log_id","updated_at","created_at"],"title":"EvaluationResultResponse"},"ObservabilityStatus":{"type":"string","enum":["pending","running","completed","failed"],"description":"Status of a Log for observability.\n\nObservability is implemented by running monitoring Evaluators on Logs.","title":"ObservabilityStatus"},"LogResponse":{"type":"object","properties":{"project":{"type":"string","description":"The name of the project associated with this log"},"project_id":{"type":"string","description":"The unique ID of the project associated with this log."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"id":{"type":"string","description":"String ID of logged datapoint. Starts with `data_`."},"reference_id":{"type":"string","description":"Unique user-provided string identifying the datapoint."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The messages passed to the to provider chat endpoint."},"output":{"type":"string","description":"Generated output from your model for the provided inputs. Can be `None` if logging an error, or if logging a parent datapoint with the intention to populate it later"},"judgment":{"$ref":"#/components/schemas/Judgment"},"config_id":{"type":"string","description":"Unique ID of a config to associate to the log."},"config":{"$ref":"#/components/schemas/ConfigResponse"},"environment":{"type":"string","description":"The environment name used to create the log."},"feedback":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackResponse"}},"created_at":{"type":"string","format":"date-time","description":"User defined timestamp for when the log was created. "},"error":{"type":"string","description":"Error message if the log is an error."},"stdout":{"type":"string","description":"Captured log and debug statements."},"duration":{"type":"number","format":"double","description":"Duration of the logged event in seconds."},"output_message":{"$ref":"#/components/schemas/ChatMessageWithToolCall","description":"The message returned by the provider."},"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt used to generate the output."},"output_tokens":{"type":"integer","description":"Number of tokens in the output generated by the model."},"prompt_cost":{"type":"number","format":"double","description":"Cost in dollars associated to the tokens in the prompt."},"output_cost":{"type":"number","format":"double","description":"Cost in dollars associated to the tokens in the output."},"provider_request":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Raw request sent to provider."},"provider_response":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Raw response received the provider."},"user":{"type":"string","description":"User email address provided when creating the datapoint."},"provider_latency":{"type":"number","format":"double","description":"Latency of provider response."},"tokens":{"type":"integer","description":"Total number of tokens in the prompt and output."},"raw_output":{"type":"string","description":"Raw output from the provider."},"finish_reason":{"type":"string","description":"Reason the generation finished."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolResultResponse"}},"tool_choice":{"$ref":"#/components/schemas/LogResponseToolChoice","description":"Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function."},"evaluation_results":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationResultResponse"}},"observability_status":{"$ref":"#/components/schemas/ObservabilityStatus"},"updated_at":{"type":"string","format":"date-time"},"batch_ids":{"type":"array","items":{"type":"string"},"description":"List of batch IDs the log belongs to."}},"required":["id","config","evaluation_results","observability_status","updated_at"],"description":"Request model for logging a datapoint.","title":"LogResponse"},"PaginatedDataLogResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/LogResponse"}},"page":{"type":"integer"},"size":{"type":"integer"},"total":{"type":"integer"}},"required":["records","page","size","total"],"title":"PaginatedDataLogResponse"},"GetModelConfigResponse":{"type":"object","properties":{"project_id":{"type":"string","description":"String ID of project the model config belongs to. Starts with `pr_`."},"project_name":{"type":"string","description":"Name of the project the model config belongs to."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_used":{"type":"string","format":"date-time"},"num_datapoints":{"type":"integer","description":"Number of datapoints associated with this project model config."},"evaluation_aggregates":{"type":"array","items":{"$ref":"#/components/schemas/ModelConfigEvaluatorAggregateResponse"},"description":"Aggregates of evaluators for the model config."},"config":{"$ref":"#/components/schemas/ConfigResponse"},"environment_id":{"type":"string","description":"ID of environment to reference in subsequent log calls."}},"required":["project_id","project_name","created_at","updated_at","last_used","config"],"description":"A selected model configuration.","title":"GetModelConfigResponse"},"EnvironmentProjectConfigResponse":{"type":"object","properties":{"project_id":{"type":"string","description":"String ID of project the model config belongs to. Starts with `pr_`."},"project_name":{"type":"string","description":"Name of the project the model config belongs to."},"model_config_id":{"type":"string","description":"Model config unique identifier generated by Humanloop."},"model_config_name":{"type":"string","description":"A friendly display name for the model config."},"environment_id":{"type":"string","description":"The ID of the environment."},"environment_name":{"type":"string","description":"The name of the environment."},"environment_tag":{"type":"string","description":"Tag for the environment e.g. 'default' or 'other'."}},"required":["project_id","project_name","environment_id","environment_name","environment_tag"],"title":"EnvironmentProjectConfigResponse"},"EnvironmentRequest":{"type":"object","properties":{"id":{"type":"string","description":"String ID of the environment. Starts with `env_`."},"name":{"type":"string","description":"The environment name."}},"required":["id"],"title":"EnvironmentRequest"},"PaginatedDataDatapointResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/DatapointResponse"}},"page":{"type":"integer"},"size":{"type":"integer"},"total":{"type":"integer"}},"required":["records","page","size","total"],"title":"PaginatedDataDatapointResponse"},"CreateDatapointsByLogsRequest":{"type":"object","properties":{"log_ids":{"type":"array","items":{"type":"string"},"description":"The IDs of the logs to create datapoints from."}},"required":["log_ids"],"title":"CreateDatapointsByLogsRequest"},"CreateDatapointRequestTargetValue":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"array","items":{"description":"Any type"}},{"type":"object","additionalProperties":{"description":"Any type"}}],"title":"CreateDatapointRequestTargetValue"},"CreateDatapointRequest":{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"type":"string"},"description":"The inputs to the prompt template for this datapoint."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The chat messages for this datapoint."},"target":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CreateDatapointRequestTargetValue"},"description":"Object with criteria necessary to evaluate this datapoint."}},"title":"CreateDatapointRequest"},"datasets_Request":{"oneOf":[{"$ref":"#/components/schemas/CreateDatapointsByLogsRequest"},{"$ref":"#/components/schemas/CreateDatapointRequest"},{"type":"array","items":{"$ref":"#/components/schemas/CreateDatapointRequest"}}],"title":"Request"},"EvaluationDatapointSnapshotResponse":{"type":"object","properties":{"datapoint":{"$ref":"#/components/schemas/DatapointResponse"},"log":{"$ref":"#/components/schemas/LogResponse"},"evaluation_results":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationResultResponse"}}},"required":["datapoint","evaluation_results"],"title":"EvaluationDatapointSnapshotResponse"},"PaginatedDataEvaluationDatapointSnapshotResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationDatapointSnapshotResponse"}},"page":{"type":"integer"},"size":{"type":"integer"},"total":{"type":"integer"}},"required":["records","page","size","total"],"title":"PaginatedDataEvaluationDatapointSnapshotResponse"},"Config":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["model"],"description":"Discriminator value: model"},"name":{"type":"string","description":"A friendly display name for the model config. If not provided, a name will be generated."},"description":{"type":"string","description":"A description of the model config."},"provider":{"$ref":"#/components/schemas/ModelProviders","description":"The company providing the underlying model service."},"model":{"type":"string","description":"The model instance used. E.g. text-davinci-002."},"max_tokens":{"type":"integer","default":-1,"description":"The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt"},"temperature":{"type":"number","format":"double","default":1,"description":"What sampling temperature to use when making a generation. Higher values means the model will be more creative."},"top_p":{"type":"number","format":"double","default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass."},"stop":{"$ref":"#/components/schemas/ModelConfigRequestStop","description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence."},"presence_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far."},"frequency_penalty":{"type":"number","format":"double","default":0,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameter values to be passed to the provider call."},"seed":{"type":"integer","description":"If specified, model will make a best effort to sample deterministically, but it is not guaranteed."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"The format of the response. Only type json_object is currently supported for chat."},"reasoning_effort":{"$ref":"#/components/schemas/ModelConfigRequestReasoningEffort","description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget."},"template_language":{"$ref":"#/components/schemas/TemplateLanguage","description":"The template language to use for rendering the template."},"endpoint":{"$ref":"#/components/schemas/ModelEndpoints","description":"The provider model endpoint used."},"prompt_template":{"type":"string","description":"Prompt template that will take your specified inputs to form your final request to the model. Input variables within the prompt template should be specified with syntax: `{{input_name}}`."},"chat_template":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. Input variables within the template should be specified with syntax: `{{input_name}}`."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ModelConfigRequestToolsItem"},"description":"Make tools available to OpenAIs chat model as functions."}},"required":["type","model"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool"],"description":"Discriminator value: tool"},"name":{"type":"string","description":"The name of the tool shown to the model."},"description":{"type":"string","description":"The description of the tool shown to the model."},"strict":{"type":"boolean","description":"Whether the tool is strict or not. If strict, the model will be forced to respond with JSON matching the parameters schema."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/"},"source":{"$ref":"#/components/schemas/ToolSource","description":"Source of the tool. If defined at an organization level will be 'organization' else 'inline'."},"source_code":{"type":"string","description":"Code source of the tool."},"other":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Other parameters that define the config."},"preset_name":{"type":"string","description":"If is_preset = true, this is the name of the preset tool on Humanloop. This is used as the key to look up the Humanloop runtime of the tool"}},"required":["type","name"]}],"discriminator":{"propertyName":"type"},"description":"The model config used for this generation. Required unless `config_id` is provided.","title":"Config"},"FeedbackValue":{"oneOf":[{"type":"boolean"},{"type":"number","format":"double"},{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"The feedback value to set. This would be the appropriate text for 'correction' or 'comment', or a label to apply for 'rating', 'action', or 'issue'.","title":"FeedbackValue"},"Feedback":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FeedbackType","description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'."},"value":{"$ref":"#/components/schemas/FeedbackValue","description":"The feedback value to set. This would be the appropriate text for 'correction' or 'comment', or a label to apply for 'rating', 'action', or 'issue'."},"data_id":{"type":"string","description":"ID to associate the feedback to a previously logged datapoint."},"user":{"type":"string","description":"A unique identifier to who provided the feedback."},"created_at":{"type":"string","format":"date-time","description":"User defined timestamp for when the feedback was created. "}},"required":["type"],"title":"Feedback"},"LogRequestFeedback":{"oneOf":[{"$ref":"#/components/schemas/Feedback"},{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}}],"description":"Optional parameter to provide feedback with your logged datapoint.","title":"LogRequestFeedback"},"LogRequest":{"type":"object","properties":{"project":{"type":"string","description":"Unique project name. If no project exists with this name, a new project will be created."},"project_id":{"type":"string","description":"Unique ID of a project to associate to the log. Either this or `project` must be provided."},"session_id":{"type":"string","description":"ID of the session to associate the datapoint."},"session_reference_id":{"type":"string","description":"A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same `session_reference_id` in subsequent log requests. Specify at most one of this or `session_id`."},"parent_id":{"type":"string","description":"ID associated to the parent datapoint in a session."},"parent_reference_id":{"type":"string","description":"A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a prior log request. Specify at most one of this or `parent_id`. Note that this cannot refer to a datapoint being logged in the same request."},"inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The inputs passed to the prompt template."},"source":{"type":"string","description":"Identifies where the model was called from."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Any additional metadata to record."},"save":{"type":"boolean","default":true,"description":"Whether the request/response payloads will be stored on Humanloop."},"source_datapoint_id":{"type":"string","description":"ID of the source datapoint if this is a log derived from a datapoint in a dataset."},"reference_id":{"type":"string","description":"A unique string to reference the datapoint. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as `parent_id` in a subsequent log request."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageWithToolCall"},"description":"The messages passed to the to provider chat endpoint."},"output":{"type":"string","description":"Generated output from your model for the provided inputs. Can be `None` if logging an error, or if logging a parent datapoint with the intention to populate it later"},"judgment":{"$ref":"#/components/schemas/Judgment"},"config_id":{"type":"string","description":"Unique ID of a config to associate to the log."},"config":{"$ref":"#/components/schemas/Config","description":"The model config used for this generation. Required unless `config_id` is provided."},"environment":{"type":"string","description":"The environment name used to create the log."},"feedback":{"$ref":"#/components/schemas/LogRequestFeedback","description":"Optional parameter to provide feedback with your logged datapoint."},"created_at":{"type":"string","format":"date-time","description":"User defined timestamp for when the log was created. "},"error":{"type":"string","description":"Error message if the log is an error."},"stdout":{"type":"string","description":"Captured log and debug statements."},"duration":{"type":"number","format":"double","description":"Duration of the logged event in seconds."},"output_message":{"$ref":"#/components/schemas/ChatMessageWithToolCall","description":"The message returned by the provider."},"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt used to generate the output."},"output_tokens":{"type":"integer","description":"Number of tokens in the output generated by the model."},"prompt_cost":{"type":"number","format":"double","description":"Cost in dollars associated to the tokens in the prompt."},"output_cost":{"type":"number","format":"double","description":"Cost in dollars associated to the tokens in the output."},"provider_request":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Raw request sent to provider."},"provider_response":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Raw response received the provider."}},"description":"Request model for logging a datapoint.","title":"LogRequest"},"CreateLogResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of logged datapoint. Starts with `data_`."},"project_id":{"type":"string","description":"String ID of project the datapoint belongs to. Starts with `pr_`."},"session_id":{"type":"string","description":"String ID of session the datapoint belongs to. Populated only if the datapoint was logged with `session_id` or `session_reference_id`, and is `None` otherwise. Starts with `sesh_`."}},"required":["id","project_id"],"title":"CreateLogResponse"},"evaluations_CreateEvaluationResultLogRequestResult":{"oneOf":[{"type":"boolean"},{"type":"integer"},{"type":"number","format":"double"}],"description":"The result value of the evaluation.","title":"CreateEvaluationResultLogRequestResult"},"PaginatedDataEvaluationResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationResponse"}},"page":{"type":"integer"},"size":{"type":"integer"},"total":{"type":"integer"}},"required":["records","page","size","total"],"title":"PaginatedDataEvaluationResponse"},"FeedbackRequestType":{"oneOf":[{"$ref":"#/components/schemas/FeedbackType"},{"type":"string"}],"description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'.","title":"FeedbackRequestType"},"FeedbackRequestValue":{"oneOf":[{"type":"boolean"},{"type":"number","format":"double"},{"type":"array","items":{"type":"string"}},{"type":"string"}],"description":"The feedback value to be set. This field should be left blank when unsetting 'rating', 'correction' or 'comment', but is required otherwise.","title":"FeedbackRequestValue"},"FeedbackRequest":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FeedbackRequestType","description":"The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'."},"value":{"$ref":"#/components/schemas/FeedbackRequestValue","description":"The feedback value to be set. This field should be left blank when unsetting 'rating', 'correction' or 'comment', but is required otherwise."},"data_id":{"type":"string","description":"ID to associate the feedback to a previously logged datapoint."},"user":{"type":"string","description":"A unique identifier to who provided the feedback."},"created_at":{"type":"string","format":"date-time","description":"User defined timestamp for when the feedback was created. "},"unset":{"type":"boolean","description":"If true, the value for this feedback is unset."}},"required":["type"],"title":"FeedbackRequest"},"feedback_FeedbackFeedbackRequest":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/FeedbackRequest"}},{"$ref":"#/components/schemas/FeedbackRequest"}],"title":"FeedbackFeedbackRequest"},"feedback_FeedbackFeedbackResponse":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/FeedbackResponse"}},{"$ref":"#/components/schemas/FeedbackResponse"}],"title":"FeedbackFeedbackResponse"},"logs_LogsLogRequest":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/LogRequest"}},{"$ref":"#/components/schemas/LogRequest"}],"title":"LogsLogRequest"},"logs_LogsLogResponse":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/CreateLogResponse"}},{"$ref":"#/components/schemas/CreateLogResponse"}],"title":"LogsLogResponse"},"UpdateLogRequest":{"type":"object","properties":{"output":{"type":"string","description":"Generated output from your model for the provided inputs."},"error":{"type":"string","description":"Error message if the log is an error."},"duration":{"type":"number","format":"double","description":"Duration of the logged event in seconds."}},"title":"UpdateLogRequest"},"modelConfigs_ProjectModelConfigRequestStop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.","title":"ProjectModelConfigRequestStop"},"modelConfigs_ProjectModelConfigRequestReasoningEffort":{"oneOf":[{"$ref":"#/components/schemas/OpenAIReasoningEffort"},{"type":"integer"}],"description":"Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.","title":"ProjectModelConfigRequestReasoningEffort"},"modelConfigs_ProjectModelConfigRequestToolsItem":{"oneOf":[{"$ref":"#/components/schemas/LinkedToolRequest"},{"$ref":"#/components/schemas/ModelConfigToolRequest"}],"title":"ProjectModelConfigRequestToolsItem"},"modelConfigs_ModelConfigsSerializeRequest":{"oneOf":[{"$ref":"#/components/schemas/ModelConfigChatRequest"},{"$ref":"#/components/schemas/ModelConfigCompletionRequest"}],"title":"ModelConfigsSerializeRequest"},"FileType":{"type":"string","enum":["prompt","tool","dataset","evaluator","flow","agent"],"description":"Enum for File types.","title":"FileType"},"SessionProjectResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of project the datapoint belongs to. Starts with `pr_`."},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/FileType","description":"Type of project. e.g. `prompt` or `tool`."}},"required":["id","name","type"],"title":"SessionProjectResponse"},"SessionResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of session. Starts with `sesh_`."},"reference_id":{"type":"string","description":"Unique user-provided string identifying the session."},"projects":{"type":"array","items":{"$ref":"#/components/schemas/SessionProjectResponse"},"description":"List of projects that have datapoints associated to this session."},"datapoints_count":{"type":"integer","description":"Number of datapoints associated to this session."},"first_inputs":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Inputs for the first datapoint in the session."},"last_output":{"type":"string","description":"Output for the last datapoint in the session."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","projects","datapoints_count","created_at","updated_at"],"title":"SessionResponse"},"PaginatedDataSessionResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/SessionResponse"}},"page":{"type":"integer"},"size":{"type":"integer"},"total":{"type":"integer"}},"required":["records","page","size","total"],"title":"PaginatedDataSessionResponse"},"CreateSessionResponse":{"type":"object","properties":{"id":{"type":"string","description":"String ID of session. Starts with `sesh_`."}},"required":["id"],"title":"CreateSessionResponse"}},"securitySchemes":{"default":{"type":"apiKey","in":"header","name":"X-API-KEY"}}}}