diff --git a/apps/opik-backend/src/test/java/com/comet/opik/api/resources/utils/resources/ChatCompletionsClient.java b/apps/opik-backend/src/test/java/com/comet/opik/api/resources/utils/resources/ChatCompletionsClient.java index 13ba0b8255..3ebf24667c 100644 --- a/apps/opik-backend/src/test/java/com/comet/opik/api/resources/utils/resources/ChatCompletionsClient.java +++ b/apps/opik-backend/src/test/java/com/comet/opik/api/resources/utils/resources/ChatCompletionsClient.java @@ -10,7 +10,6 @@ import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; -import lombok.Builder; import org.apache.http.HttpStatus; import org.glassfish.jersey.client.ChunkedInput; import ru.vyarus.dropwizard.guice.test.ClientSupport; diff --git a/apps/opik-backend/src/test/java/com/comet/opik/api/resources/v1/priv/ChatCompletionsResourceTest.java b/apps/opik-backend/src/test/java/com/comet/opik/api/resources/v1/priv/ChatCompletionsResourceTest.java index 14fe8817b8..c7e41ba620 100644 --- a/apps/opik-backend/src/test/java/com/comet/opik/api/resources/v1/priv/ChatCompletionsResourceTest.java +++ b/apps/opik-backend/src/test/java/com/comet/opik/api/resources/v1/priv/ChatCompletionsResourceTest.java @@ -72,8 +72,7 @@ void setUpAll(ClientSupport clientSupport, Jdbi jdbi) throws SQLException { MigrationUtils.runDbMigration( connection, MigrationUtils.CLICKHOUSE_CHANGELOG_FILE, - ClickHouseContainerUtils.migrationParameters() - ); + ClickHouseContainerUtils.migrationParameters()); } ClientSupportUtils.config(clientSupport); diff --git a/apps/opik-documentation/documentation/rest_api/opik.yaml b/apps/opik-documentation/documentation/rest_api/opik.yaml index 1ab4a505a2..29f8366390 100644 --- a/apps/opik-documentation/documentation/rest_api/opik.yaml +++ b/apps/opik-documentation/documentation/rest_api/opik.yaml @@ -39,12 +39,16 @@ tags: description: System usage related resource - name: Check description: Access check resources +- name: Chat Completions + description: Chat Completions related resources - name: Datasets description: Dataset resources - name: Experiments description: Experiment resources - name: Feedback-definitions description: Feedback definitions related resources +- name: LlmProviderKey + description: LLM Provider Key - name: Projects description: Project related resources - name: Prompts @@ -137,6 +141,33 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' + /v1/private/chat/completions: + post: + tags: + - Chat Completions + summary: Get chat completions + description: Get chat completions + operationId: getChatCompletions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChatCompletionRequest' + responses: + "501": + description: Chat completions response + content: + text/event-stream: + schema: + type: array + items: + type: object + anyOf: + - $ref: '#/components/schemas/ChatCompletionResponse' + - $ref: '#/components/schemas/ErrorMessage' + application/json: + schema: + $ref: '#/components/schemas/ChatCompletionResponse' /v1/private/datasets: get: tags: @@ -449,6 +480,31 @@ paths: application/json: schema: $ref: '#/components/schemas/DatasetItemPage_Public' + /v1/private/datasets/{id}/items/experiments/items/output/columns: + get: + tags: + - Datasets + summary: Get dataset items output columns + description: Get dataset items output columns + operationId: getDatasetItemsOutputColumns + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + - name: experiment_ids + in: query + schema: + type: string + responses: + "200": + description: Dataset item output columns + content: + application/json: + schema: + $ref: '#/components/schemas/PageColumns' /v1/private/datasets/items/stream: post: tags: @@ -821,6 +877,106 @@ paths: responses: "204": description: No Content + /v1/private/llm-provider-key/{id}: + get: + tags: + - LlmProviderKey + summary: Get LLM Provider's ApiKey by id + description: Get LLM Provider's ApiKey by id + operationId: getLlmProviderApiKeyById + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + description: ProviderApiKey resource + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderApiKey_Public' + "404": + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage_Public' + patch: + tags: + - LlmProviderKey + summary: Update LLM Provider's ApiKey + description: Update LLM Provider's ApiKey + operationId: updateLlmProviderApiKey + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderApiKeyUpdate' + responses: + "204": + description: No Content + "401": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + "403": + description: Access forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + "404": + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + /v1/private/llm-provider-key: + post: + tags: + - LlmProviderKey + summary: Store LLM Provider's ApiKey + description: Store LLM Provider's ApiKey + operationId: storeLlmProviderApiKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderApiKey_Write' + responses: + "201": + description: Created + headers: + Location: + required: true + style: simple + schema: + type: string + example: "${basePath}/v1/private/proxy/api_key/{apiKeyId}" + "401": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + "403": + description: Access forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' /v1/private/projects: get: tags: @@ -1988,6 +2144,256 @@ components: type: string AuthDetailsHolder: type: object + AssistantMessage: + type: object + properties: + role: + type: string + enum: + - system + - user + - assistant + - tool + - function + content: + type: string + name: + type: string + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + refusal: + type: boolean + function_call: + $ref: '#/components/schemas/FunctionCall' + ChatCompletionChoice: + type: object + properties: + index: + type: integer + format: int32 + message: + $ref: '#/components/schemas/AssistantMessage' + delta: + $ref: '#/components/schemas/Delta' + finish_reason: + type: string + ChatCompletionResponse: + type: object + properties: + id: + type: string + created: + type: integer + format: int32 + model: + type: string + choices: + type: array + items: + $ref: '#/components/schemas/ChatCompletionChoice' + usage: + $ref: '#/components/schemas/Usage' + system_fingerprint: + type: string + CompletionTokensDetails: + type: object + properties: + reasoning_tokens: + type: integer + format: int32 + Delta: + type: object + properties: + role: + type: string + enum: + - system + - user + - assistant + - tool + - function + content: + type: string + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + function_call: + $ref: '#/components/schemas/FunctionCall' + FunctionCall: + type: object + properties: + name: + type: string + arguments: + type: string + ToolCall: + type: object + properties: + id: + type: string + index: + type: integer + format: int32 + type: + type: string + enum: + - function + function: + $ref: '#/components/schemas/FunctionCall' + Usage: + type: object + properties: + total_tokens: + type: integer + format: int32 + prompt_tokens: + type: integer + format: int32 + completion_tokens: + type: integer + format: int32 + completion_tokens_details: + $ref: '#/components/schemas/CompletionTokensDetails' + ChatCompletionRequest: + type: object + properties: + model: + type: string + messages: + type: array + items: + $ref: '#/components/schemas/Message' + temperature: + type: number + format: double + top_p: + type: number + format: double + "n": + type: integer + format: int32 + stream: + type: boolean + stream_options: + $ref: '#/components/schemas/StreamOptions' + stop: + type: array + items: + type: string + max_tokens: + type: integer + format: int32 + max_completion_tokens: + type: integer + format: int32 + presence_penalty: + type: number + format: double + frequency_penalty: + type: number + format: double + logit_bias: + type: object + additionalProperties: + type: integer + format: int32 + user: + type: string + response_format: + $ref: '#/components/schemas/ResponseFormat' + seed: + type: integer + format: int32 + tools: + type: array + items: + $ref: '#/components/schemas/Tool' + tool_choice: + type: object + parallel_tool_calls: + type: boolean + functions: + type: array + items: + $ref: '#/components/schemas/Function' + function_call: + $ref: '#/components/schemas/FunctionCall' + Function: + type: object + properties: + name: + type: string + description: + type: string + strict: + type: boolean + parameters: + $ref: '#/components/schemas/JsonObjectSchema' + JsonObjectSchema: + type: object + properties: + type: + type: string + description: + type: string + properties: + type: object + additionalProperties: + $ref: '#/components/schemas/JsonSchemaElement' + required: + type: array + items: + type: string + additionalProperties: + type: boolean + $defs: + type: object + additionalProperties: + $ref: '#/components/schemas/JsonSchemaElement' + JsonSchema: + type: object + properties: + name: + type: string + strict: + type: boolean + schema: + $ref: '#/components/schemas/JsonObjectSchema' + JsonSchemaElement: + type: object + properties: + type: + type: string + Message: + type: object + ResponseFormat: + type: object + properties: + type: + type: string + enum: + - text + - json_object + - json_schema + json_schema: + $ref: '#/components/schemas/JsonSchema' + StreamOptions: + type: object + properties: + include_usage: + type: boolean + Tool: + type: object + properties: + type: + type: string + enum: + - function + function: + $ref: '#/components/schemas/Function' Dataset: required: - name @@ -2293,6 +2699,12 @@ components: - boolean - array - "null" + filter_field_prefix: + type: string + filterField: + type: string + description: The field to use for filtering + readOnly: true DatasetItemPage_Compare: type: object properties: @@ -2613,6 +3025,12 @@ components: - boolean - array - "null" + filter_field_prefix: + type: string + filterField: + type: string + description: The field to use for filtering + readOnly: true DatasetItemPage_Public: type: object properties: @@ -2634,6 +3052,36 @@ components: type: array items: $ref: '#/components/schemas/Column_Public' + Column: + type: object + properties: + name: + type: string + types: + uniqueItems: true + type: array + items: + type: string + enum: + - string + - number + - object + - boolean + - array + - "null" + filter_field_prefix: + type: string + filterField: + type: string + description: The field to use for filtering + readOnly: true + PageColumns: + type: object + properties: + columns: + type: array + items: + $ref: '#/components/schemas/Column' ChunkedOutputJsonNode: type: object properties: @@ -3303,6 +3751,78 @@ components: type: number min: type: number + ProviderApiKey_Public: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + provider: + type: string + enum: + - openai + created_at: + type: string + format: date-time + readOnly: true + created_by: + type: string + readOnly: true + last_updated_at: + type: string + format: date-time + readOnly: true + last_updated_by: + type: string + readOnly: true + ProviderApiKey: + required: + - api_key + type: object + properties: + id: + type: string + format: uuid + readOnly: true + provider: + type: string + enum: + - openai + api_key: + type: string + created_at: + type: string + format: date-time + readOnly: true + created_by: + type: string + readOnly: true + last_updated_at: + type: string + format: date-time + readOnly: true + last_updated_by: + type: string + readOnly: true + ProviderApiKey_Write: + required: + - api_key + type: object + properties: + provider: + type: string + enum: + - openai + api_key: + type: string + ProviderApiKeyUpdate: + required: + - api_key + type: object + properties: + api_key: + type: string Project: required: - name @@ -3315,7 +3835,6 @@ components: name: type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string created_at: type: string @@ -3343,7 +3862,6 @@ components: name: type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string ProjectPage_Public: type: object @@ -3377,7 +3895,6 @@ components: name: type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string created_at: type: string @@ -3477,7 +3994,6 @@ components: pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string Prompt: required: diff --git a/sdks/code_generation/fern/openapi/openapi.yaml b/sdks/code_generation/fern/openapi/openapi.yaml index 1ab4a505a2..29f8366390 100644 --- a/sdks/code_generation/fern/openapi/openapi.yaml +++ b/sdks/code_generation/fern/openapi/openapi.yaml @@ -39,12 +39,16 @@ tags: description: System usage related resource - name: Check description: Access check resources +- name: Chat Completions + description: Chat Completions related resources - name: Datasets description: Dataset resources - name: Experiments description: Experiment resources - name: Feedback-definitions description: Feedback definitions related resources +- name: LlmProviderKey + description: LLM Provider Key - name: Projects description: Project related resources - name: Prompts @@ -137,6 +141,33 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' + /v1/private/chat/completions: + post: + tags: + - Chat Completions + summary: Get chat completions + description: Get chat completions + operationId: getChatCompletions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChatCompletionRequest' + responses: + "501": + description: Chat completions response + content: + text/event-stream: + schema: + type: array + items: + type: object + anyOf: + - $ref: '#/components/schemas/ChatCompletionResponse' + - $ref: '#/components/schemas/ErrorMessage' + application/json: + schema: + $ref: '#/components/schemas/ChatCompletionResponse' /v1/private/datasets: get: tags: @@ -449,6 +480,31 @@ paths: application/json: schema: $ref: '#/components/schemas/DatasetItemPage_Public' + /v1/private/datasets/{id}/items/experiments/items/output/columns: + get: + tags: + - Datasets + summary: Get dataset items output columns + description: Get dataset items output columns + operationId: getDatasetItemsOutputColumns + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + - name: experiment_ids + in: query + schema: + type: string + responses: + "200": + description: Dataset item output columns + content: + application/json: + schema: + $ref: '#/components/schemas/PageColumns' /v1/private/datasets/items/stream: post: tags: @@ -821,6 +877,106 @@ paths: responses: "204": description: No Content + /v1/private/llm-provider-key/{id}: + get: + tags: + - LlmProviderKey + summary: Get LLM Provider's ApiKey by id + description: Get LLM Provider's ApiKey by id + operationId: getLlmProviderApiKeyById + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + description: ProviderApiKey resource + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderApiKey_Public' + "404": + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage_Public' + patch: + tags: + - LlmProviderKey + summary: Update LLM Provider's ApiKey + description: Update LLM Provider's ApiKey + operationId: updateLlmProviderApiKey + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderApiKeyUpdate' + responses: + "204": + description: No Content + "401": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + "403": + description: Access forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + "404": + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + /v1/private/llm-provider-key: + post: + tags: + - LlmProviderKey + summary: Store LLM Provider's ApiKey + description: Store LLM Provider's ApiKey + operationId: storeLlmProviderApiKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderApiKey_Write' + responses: + "201": + description: Created + headers: + Location: + required: true + style: simple + schema: + type: string + example: "${basePath}/v1/private/proxy/api_key/{apiKeyId}" + "401": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + "403": + description: Access forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' /v1/private/projects: get: tags: @@ -1988,6 +2144,256 @@ components: type: string AuthDetailsHolder: type: object + AssistantMessage: + type: object + properties: + role: + type: string + enum: + - system + - user + - assistant + - tool + - function + content: + type: string + name: + type: string + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + refusal: + type: boolean + function_call: + $ref: '#/components/schemas/FunctionCall' + ChatCompletionChoice: + type: object + properties: + index: + type: integer + format: int32 + message: + $ref: '#/components/schemas/AssistantMessage' + delta: + $ref: '#/components/schemas/Delta' + finish_reason: + type: string + ChatCompletionResponse: + type: object + properties: + id: + type: string + created: + type: integer + format: int32 + model: + type: string + choices: + type: array + items: + $ref: '#/components/schemas/ChatCompletionChoice' + usage: + $ref: '#/components/schemas/Usage' + system_fingerprint: + type: string + CompletionTokensDetails: + type: object + properties: + reasoning_tokens: + type: integer + format: int32 + Delta: + type: object + properties: + role: + type: string + enum: + - system + - user + - assistant + - tool + - function + content: + type: string + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + function_call: + $ref: '#/components/schemas/FunctionCall' + FunctionCall: + type: object + properties: + name: + type: string + arguments: + type: string + ToolCall: + type: object + properties: + id: + type: string + index: + type: integer + format: int32 + type: + type: string + enum: + - function + function: + $ref: '#/components/schemas/FunctionCall' + Usage: + type: object + properties: + total_tokens: + type: integer + format: int32 + prompt_tokens: + type: integer + format: int32 + completion_tokens: + type: integer + format: int32 + completion_tokens_details: + $ref: '#/components/schemas/CompletionTokensDetails' + ChatCompletionRequest: + type: object + properties: + model: + type: string + messages: + type: array + items: + $ref: '#/components/schemas/Message' + temperature: + type: number + format: double + top_p: + type: number + format: double + "n": + type: integer + format: int32 + stream: + type: boolean + stream_options: + $ref: '#/components/schemas/StreamOptions' + stop: + type: array + items: + type: string + max_tokens: + type: integer + format: int32 + max_completion_tokens: + type: integer + format: int32 + presence_penalty: + type: number + format: double + frequency_penalty: + type: number + format: double + logit_bias: + type: object + additionalProperties: + type: integer + format: int32 + user: + type: string + response_format: + $ref: '#/components/schemas/ResponseFormat' + seed: + type: integer + format: int32 + tools: + type: array + items: + $ref: '#/components/schemas/Tool' + tool_choice: + type: object + parallel_tool_calls: + type: boolean + functions: + type: array + items: + $ref: '#/components/schemas/Function' + function_call: + $ref: '#/components/schemas/FunctionCall' + Function: + type: object + properties: + name: + type: string + description: + type: string + strict: + type: boolean + parameters: + $ref: '#/components/schemas/JsonObjectSchema' + JsonObjectSchema: + type: object + properties: + type: + type: string + description: + type: string + properties: + type: object + additionalProperties: + $ref: '#/components/schemas/JsonSchemaElement' + required: + type: array + items: + type: string + additionalProperties: + type: boolean + $defs: + type: object + additionalProperties: + $ref: '#/components/schemas/JsonSchemaElement' + JsonSchema: + type: object + properties: + name: + type: string + strict: + type: boolean + schema: + $ref: '#/components/schemas/JsonObjectSchema' + JsonSchemaElement: + type: object + properties: + type: + type: string + Message: + type: object + ResponseFormat: + type: object + properties: + type: + type: string + enum: + - text + - json_object + - json_schema + json_schema: + $ref: '#/components/schemas/JsonSchema' + StreamOptions: + type: object + properties: + include_usage: + type: boolean + Tool: + type: object + properties: + type: + type: string + enum: + - function + function: + $ref: '#/components/schemas/Function' Dataset: required: - name @@ -2293,6 +2699,12 @@ components: - boolean - array - "null" + filter_field_prefix: + type: string + filterField: + type: string + description: The field to use for filtering + readOnly: true DatasetItemPage_Compare: type: object properties: @@ -2613,6 +3025,12 @@ components: - boolean - array - "null" + filter_field_prefix: + type: string + filterField: + type: string + description: The field to use for filtering + readOnly: true DatasetItemPage_Public: type: object properties: @@ -2634,6 +3052,36 @@ components: type: array items: $ref: '#/components/schemas/Column_Public' + Column: + type: object + properties: + name: + type: string + types: + uniqueItems: true + type: array + items: + type: string + enum: + - string + - number + - object + - boolean + - array + - "null" + filter_field_prefix: + type: string + filterField: + type: string + description: The field to use for filtering + readOnly: true + PageColumns: + type: object + properties: + columns: + type: array + items: + $ref: '#/components/schemas/Column' ChunkedOutputJsonNode: type: object properties: @@ -3303,6 +3751,78 @@ components: type: number min: type: number + ProviderApiKey_Public: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + provider: + type: string + enum: + - openai + created_at: + type: string + format: date-time + readOnly: true + created_by: + type: string + readOnly: true + last_updated_at: + type: string + format: date-time + readOnly: true + last_updated_by: + type: string + readOnly: true + ProviderApiKey: + required: + - api_key + type: object + properties: + id: + type: string + format: uuid + readOnly: true + provider: + type: string + enum: + - openai + api_key: + type: string + created_at: + type: string + format: date-time + readOnly: true + created_by: + type: string + readOnly: true + last_updated_at: + type: string + format: date-time + readOnly: true + last_updated_by: + type: string + readOnly: true + ProviderApiKey_Write: + required: + - api_key + type: object + properties: + provider: + type: string + enum: + - openai + api_key: + type: string + ProviderApiKeyUpdate: + required: + - api_key + type: object + properties: + api_key: + type: string Project: required: - name @@ -3315,7 +3835,6 @@ components: name: type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string created_at: type: string @@ -3343,7 +3862,6 @@ components: name: type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string ProjectPage_Public: type: object @@ -3377,7 +3895,6 @@ components: name: type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string created_at: type: string @@ -3477,7 +3994,6 @@ components: pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string description: - pattern: (?s)^\s*(\S.*\S|\S)\s*$ type: string Prompt: required: diff --git a/sdks/python/src/opik/rest_api/__init__.py b/sdks/python/src/opik/rest_api/__init__.py index 9baadf35bc..4bd3ea0860 100644 --- a/sdks/python/src/opik/rest_api/__init__.py +++ b/sdks/python/src/opik/rest_api/__init__.py @@ -1,6 +1,8 @@ # This file was auto-generated by Fern from our API Definition. from .types import ( + AssistantMessage, + AssistantMessageRole, AuthDetailsHolder, AvgValueStatPublic, BatchDelete, @@ -14,12 +16,17 @@ CategoricalFeedbackDetailCreate, CategoricalFeedbackDetailPublic, CategoricalFeedbackDetailUpdate, + ChatCompletionChoice, + ChatCompletionResponse, ChunkedOutputJsonNode, ChunkedOutputJsonNodeType, + Column, ColumnCompare, ColumnCompareTypesItem, ColumnPublic, ColumnPublicTypesItem, + ColumnTypesItem, + CompletionTokensDetails, CountValueStatPublic, DataPointNumberPublic, Dataset, @@ -37,6 +44,8 @@ DatasetPagePublic, DatasetPublic, DeleteFeedbackScore, + Delta, + DeltaRole, ErrorMessage, ErrorMessageDetail, ErrorMessagePublic, @@ -73,10 +82,17 @@ FeedbackUpdate_Numerical, Feedback_Categorical, Feedback_Numerical, + Function, + FunctionCall, JsonNode, JsonNodeCompare, JsonNodePublic, JsonNodeWrite, + JsonObjectSchema, + JsonSchema, + JsonSchemaElement, + Message, + NotImplementedErrorBodyItem, NumericalFeedbackDefinition, NumericalFeedbackDefinitionCreate, NumericalFeedbackDefinitionPublic, @@ -85,6 +101,7 @@ NumericalFeedbackDetailCreate, NumericalFeedbackDetailPublic, NumericalFeedbackDetailUpdate, + PageColumns, PercentageValueStatPublic, PercentageValuesPublic, Project, @@ -109,6 +126,10 @@ PromptVersionLinkWrite, PromptVersionPagePublic, PromptVersionPublic, + ProviderApiKey, + ProviderApiKeyPublic, + ResponseFormat, + ResponseFormatType, ResultsNumberPublic, Span, SpanBatch, @@ -118,12 +139,16 @@ SpanType, SpanWrite, SpanWriteType, + StreamOptions, + Tool, + ToolCall, Trace, TraceBatch, TraceCountResponse, TracePagePublic, TracePublic, TraceWrite, + Usage, WorkspaceTraceCount, ) from .errors import ( @@ -136,10 +161,12 @@ UnprocessableEntityError, ) from . import ( + chat_completions, check, datasets, experiments, feedback_definitions, + llm_provider_key, projects, prompts, spans, @@ -160,6 +187,8 @@ ) __all__ = [ + "AssistantMessage", + "AssistantMessageRole", "AsyncOpikApi", "AuthDetailsHolder", "AvgValueStatPublic", @@ -175,12 +204,17 @@ "CategoricalFeedbackDetailCreate", "CategoricalFeedbackDetailPublic", "CategoricalFeedbackDetailUpdate", + "ChatCompletionChoice", + "ChatCompletionResponse", "ChunkedOutputJsonNode", "ChunkedOutputJsonNodeType", + "Column", "ColumnCompare", "ColumnCompareTypesItem", "ColumnPublic", "ColumnPublicTypesItem", + "ColumnTypesItem", + "CompletionTokensDetails", "ConflictError", "CountValueStatPublic", "DataPointNumberPublic", @@ -199,6 +233,8 @@ "DatasetPagePublic", "DatasetPublic", "DeleteFeedbackScore", + "Delta", + "DeltaRole", "ErrorMessage", "ErrorMessageDetail", "ErrorMessagePublic", @@ -238,14 +274,21 @@ "FindFeedbackDefinitionsRequestType", "FindFeedbackScoreNames1RequestType", "ForbiddenError", + "Function", + "FunctionCall", "GetSpanStatsRequestType", "GetSpansByProjectRequestType", "JsonNode", "JsonNodeCompare", "JsonNodePublic", "JsonNodeWrite", + "JsonObjectSchema", + "JsonSchema", + "JsonSchemaElement", + "Message", "NotFoundError", "NotImplementedError", + "NotImplementedErrorBodyItem", "NumericalFeedbackDefinition", "NumericalFeedbackDefinitionCreate", "NumericalFeedbackDefinitionPublic", @@ -256,6 +299,7 @@ "NumericalFeedbackDetailUpdate", "OpikApi", "OpikApiEnvironment", + "PageColumns", "PercentageValueStatPublic", "PercentageValuesPublic", "Project", @@ -282,6 +326,10 @@ "PromptVersionLinkWrite", "PromptVersionPagePublic", "PromptVersionPublic", + "ProviderApiKey", + "ProviderApiKeyPublic", + "ResponseFormat", + "ResponseFormatType", "ResultsNumberPublic", "Span", "SpanBatch", @@ -291,6 +339,9 @@ "SpanType", "SpanWrite", "SpanWriteType", + "StreamOptions", + "Tool", + "ToolCall", "Trace", "TraceBatch", "TraceCountResponse", @@ -299,11 +350,14 @@ "TraceWrite", "UnauthorizedError", "UnprocessableEntityError", + "Usage", "WorkspaceTraceCount", + "chat_completions", "check", "datasets", "experiments", "feedback_definitions", + "llm_provider_key", "projects", "prompts", "spans", diff --git a/sdks/python/src/opik/rest_api/chat_completions/__init__.py b/sdks/python/src/opik/rest_api/chat_completions/__init__.py new file mode 100644 index 0000000000..f3ea2659bb --- /dev/null +++ b/sdks/python/src/opik/rest_api/chat_completions/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/sdks/python/src/opik/rest_api/chat_completions/client.py b/sdks/python/src/opik/rest_api/chat_completions/client.py new file mode 100644 index 0000000000..1039efe519 --- /dev/null +++ b/sdks/python/src/opik/rest_api/chat_completions/client.py @@ -0,0 +1,344 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ..core.client_wrapper import SyncClientWrapper +from ..types.message import Message +from ..types.stream_options import StreamOptions +from ..types.response_format import ResponseFormat +from ..types.tool import Tool +from ..types.function import Function +from ..types.function_call import FunctionCall +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..errors.not_implemented_error import NotImplementedError +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ChatCompletionsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_chat_completions( + self, + *, + model: typing.Optional[str] = OMIT, + messages: typing.Optional[typing.Sequence[Message]] = OMIT, + temperature: typing.Optional[float] = OMIT, + top_p: typing.Optional[float] = OMIT, + n: typing.Optional[int] = OMIT, + stream: typing.Optional[bool] = OMIT, + stream_options: typing.Optional[StreamOptions] = OMIT, + stop: typing.Optional[typing.Sequence[str]] = OMIT, + max_tokens: typing.Optional[int] = OMIT, + max_completion_tokens: typing.Optional[int] = OMIT, + presence_penalty: typing.Optional[float] = OMIT, + frequency_penalty: typing.Optional[float] = OMIT, + logit_bias: typing.Optional[typing.Dict[str, int]] = OMIT, + user: typing.Optional[str] = OMIT, + response_format: typing.Optional[ResponseFormat] = OMIT, + seed: typing.Optional[int] = OMIT, + tools: typing.Optional[typing.Sequence[Tool]] = OMIT, + tool_choice: typing.Optional[ + typing.Dict[str, typing.Optional[typing.Any]] + ] = OMIT, + parallel_tool_calls: typing.Optional[bool] = OMIT, + functions: typing.Optional[typing.Sequence[Function]] = OMIT, + function_call: typing.Optional[FunctionCall] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Get chat completions + + Parameters + ---------- + model : typing.Optional[str] + + messages : typing.Optional[typing.Sequence[Message]] + + temperature : typing.Optional[float] + + top_p : typing.Optional[float] + + n : typing.Optional[int] + + stream : typing.Optional[bool] + + stream_options : typing.Optional[StreamOptions] + + stop : typing.Optional[typing.Sequence[str]] + + max_tokens : typing.Optional[int] + + max_completion_tokens : typing.Optional[int] + + presence_penalty : typing.Optional[float] + + frequency_penalty : typing.Optional[float] + + logit_bias : typing.Optional[typing.Dict[str, int]] + + user : typing.Optional[str] + + response_format : typing.Optional[ResponseFormat] + + seed : typing.Optional[int] + + tools : typing.Optional[typing.Sequence[Tool]] + + tool_choice : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + parallel_tool_calls : typing.Optional[bool] + + functions : typing.Optional[typing.Sequence[Function]] + + function_call : typing.Optional[FunctionCall] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from Opik import OpikApi + + client = OpikApi() + client.chat_completions.get_chat_completions() + """ + _response = self._client_wrapper.httpx_client.request( + "v1/private/chat/completions", + method="POST", + json={ + "model": model, + "messages": messages, + "temperature": temperature, + "top_p": top_p, + "n": n, + "stream": stream, + "stream_options": convert_and_respect_annotation_metadata( + object_=stream_options, annotation=StreamOptions, direction="write" + ), + "stop": stop, + "max_tokens": max_tokens, + "max_completion_tokens": max_completion_tokens, + "presence_penalty": presence_penalty, + "frequency_penalty": frequency_penalty, + "logit_bias": logit_bias, + "user": user, + "response_format": convert_and_respect_annotation_metadata( + object_=response_format, + annotation=ResponseFormat, + direction="write", + ), + "seed": seed, + "tools": convert_and_respect_annotation_metadata( + object_=tools, annotation=typing.Sequence[Tool], direction="write" + ), + "tool_choice": tool_choice, + "parallel_tool_calls": parallel_tool_calls, + "functions": convert_and_respect_annotation_metadata( + object_=functions, + annotation=typing.Sequence[Function], + direction="write", + ), + "function_call": convert_and_respect_annotation_metadata( + object_=function_call, annotation=FunctionCall, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 501: + raise NotImplementedError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncChatCompletionsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_chat_completions( + self, + *, + model: typing.Optional[str] = OMIT, + messages: typing.Optional[typing.Sequence[Message]] = OMIT, + temperature: typing.Optional[float] = OMIT, + top_p: typing.Optional[float] = OMIT, + n: typing.Optional[int] = OMIT, + stream: typing.Optional[bool] = OMIT, + stream_options: typing.Optional[StreamOptions] = OMIT, + stop: typing.Optional[typing.Sequence[str]] = OMIT, + max_tokens: typing.Optional[int] = OMIT, + max_completion_tokens: typing.Optional[int] = OMIT, + presence_penalty: typing.Optional[float] = OMIT, + frequency_penalty: typing.Optional[float] = OMIT, + logit_bias: typing.Optional[typing.Dict[str, int]] = OMIT, + user: typing.Optional[str] = OMIT, + response_format: typing.Optional[ResponseFormat] = OMIT, + seed: typing.Optional[int] = OMIT, + tools: typing.Optional[typing.Sequence[Tool]] = OMIT, + tool_choice: typing.Optional[ + typing.Dict[str, typing.Optional[typing.Any]] + ] = OMIT, + parallel_tool_calls: typing.Optional[bool] = OMIT, + functions: typing.Optional[typing.Sequence[Function]] = OMIT, + function_call: typing.Optional[FunctionCall] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Get chat completions + + Parameters + ---------- + model : typing.Optional[str] + + messages : typing.Optional[typing.Sequence[Message]] + + temperature : typing.Optional[float] + + top_p : typing.Optional[float] + + n : typing.Optional[int] + + stream : typing.Optional[bool] + + stream_options : typing.Optional[StreamOptions] + + stop : typing.Optional[typing.Sequence[str]] + + max_tokens : typing.Optional[int] + + max_completion_tokens : typing.Optional[int] + + presence_penalty : typing.Optional[float] + + frequency_penalty : typing.Optional[float] + + logit_bias : typing.Optional[typing.Dict[str, int]] + + user : typing.Optional[str] + + response_format : typing.Optional[ResponseFormat] + + seed : typing.Optional[int] + + tools : typing.Optional[typing.Sequence[Tool]] + + tool_choice : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + parallel_tool_calls : typing.Optional[bool] + + functions : typing.Optional[typing.Sequence[Function]] + + function_call : typing.Optional[FunctionCall] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi() + + + async def main() -> None: + await client.chat_completions.get_chat_completions() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/private/chat/completions", + method="POST", + json={ + "model": model, + "messages": messages, + "temperature": temperature, + "top_p": top_p, + "n": n, + "stream": stream, + "stream_options": convert_and_respect_annotation_metadata( + object_=stream_options, annotation=StreamOptions, direction="write" + ), + "stop": stop, + "max_tokens": max_tokens, + "max_completion_tokens": max_completion_tokens, + "presence_penalty": presence_penalty, + "frequency_penalty": frequency_penalty, + "logit_bias": logit_bias, + "user": user, + "response_format": convert_and_respect_annotation_metadata( + object_=response_format, + annotation=ResponseFormat, + direction="write", + ), + "seed": seed, + "tools": convert_and_respect_annotation_metadata( + object_=tools, annotation=typing.Sequence[Tool], direction="write" + ), + "tool_choice": tool_choice, + "parallel_tool_calls": parallel_tool_calls, + "functions": convert_and_respect_annotation_metadata( + object_=functions, + annotation=typing.Sequence[Function], + direction="write", + ), + "function_call": convert_and_respect_annotation_metadata( + object_=function_call, annotation=FunctionCall, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 501: + raise NotImplementedError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdks/python/src/opik/rest_api/client.py b/sdks/python/src/opik/rest_api/client.py index e57e34f99c..e03841b085 100644 --- a/sdks/python/src/opik/rest_api/client.py +++ b/sdks/python/src/opik/rest_api/client.py @@ -6,9 +6,11 @@ from .core.client_wrapper import SyncClientWrapper from .system_usage.client import SystemUsageClient from .check.client import CheckClient +from .chat_completions.client import ChatCompletionsClient from .datasets.client import DatasetsClient from .experiments.client import ExperimentsClient from .feedback_definitions.client import FeedbackDefinitionsClient +from .llm_provider_key.client import LlmProviderKeyClient from .projects.client import ProjectsClient from .prompts.client import PromptsClient from .spans.client import SpansClient @@ -20,9 +22,11 @@ from .core.client_wrapper import AsyncClientWrapper from .system_usage.client import AsyncSystemUsageClient from .check.client import AsyncCheckClient +from .chat_completions.client import AsyncChatCompletionsClient from .datasets.client import AsyncDatasetsClient from .experiments.client import AsyncExperimentsClient from .feedback_definitions.client import AsyncFeedbackDefinitionsClient +from .llm_provider_key.client import AsyncLlmProviderKeyClient from .projects.client import AsyncProjectsClient from .prompts.client import AsyncPromptsClient from .spans.client import AsyncSpansClient @@ -88,11 +92,17 @@ def __init__( ) self.system_usage = SystemUsageClient(client_wrapper=self._client_wrapper) self.check = CheckClient(client_wrapper=self._client_wrapper) + self.chat_completions = ChatCompletionsClient( + client_wrapper=self._client_wrapper + ) self.datasets = DatasetsClient(client_wrapper=self._client_wrapper) self.experiments = ExperimentsClient(client_wrapper=self._client_wrapper) self.feedback_definitions = FeedbackDefinitionsClient( client_wrapper=self._client_wrapper ) + self.llm_provider_key = LlmProviderKeyClient( + client_wrapper=self._client_wrapper + ) self.projects = ProjectsClient(client_wrapper=self._client_wrapper) self.prompts = PromptsClient(client_wrapper=self._client_wrapper) self.spans = SpansClient(client_wrapper=self._client_wrapper) @@ -238,11 +248,17 @@ def __init__( ) self.system_usage = AsyncSystemUsageClient(client_wrapper=self._client_wrapper) self.check = AsyncCheckClient(client_wrapper=self._client_wrapper) + self.chat_completions = AsyncChatCompletionsClient( + client_wrapper=self._client_wrapper + ) self.datasets = AsyncDatasetsClient(client_wrapper=self._client_wrapper) self.experiments = AsyncExperimentsClient(client_wrapper=self._client_wrapper) self.feedback_definitions = AsyncFeedbackDefinitionsClient( client_wrapper=self._client_wrapper ) + self.llm_provider_key = AsyncLlmProviderKeyClient( + client_wrapper=self._client_wrapper + ) self.projects = AsyncProjectsClient(client_wrapper=self._client_wrapper) self.prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper) self.spans = AsyncSpansClient(client_wrapper=self._client_wrapper) diff --git a/sdks/python/src/opik/rest_api/datasets/client.py b/sdks/python/src/opik/rest_api/datasets/client.py index 7ef54d6f1c..13f219e72e 100644 --- a/sdks/python/src/opik/rest_api/datasets/client.py +++ b/sdks/python/src/opik/rest_api/datasets/client.py @@ -14,6 +14,7 @@ from ..types.dataset_item_page_compare import DatasetItemPageCompare from ..types.dataset_item_public import DatasetItemPublic from ..types.dataset_item_page_public import DatasetItemPagePublic +from ..types.page_columns import PageColumns from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -741,6 +742,61 @@ def get_dataset_items( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def get_dataset_items_output_columns( + self, + id: str, + *, + experiment_ids: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PageColumns: + """ + Get dataset items output columns + + Parameters + ---------- + id : str + + experiment_ids : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PageColumns + Dataset item output columns + + Examples + -------- + from Opik import OpikApi + + client = OpikApi() + client.datasets.get_dataset_items_output_columns( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/datasets/{jsonable_encoder(id)}/items/experiments/items/output/columns", + method="GET", + params={ + "experiment_ids": experiment_ids, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + PageColumns, + parse_obj_as( + type_=PageColumns, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def stream_dataset_items( self, *, @@ -1624,6 +1680,69 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def get_dataset_items_output_columns( + self, + id: str, + *, + experiment_ids: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PageColumns: + """ + Get dataset items output columns + + Parameters + ---------- + id : str + + experiment_ids : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + PageColumns + Dataset item output columns + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi() + + + async def main() -> None: + await client.datasets.get_dataset_items_output_columns( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/datasets/{jsonable_encoder(id)}/items/experiments/items/output/columns", + method="GET", + params={ + "experiment_ids": experiment_ids, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + PageColumns, + parse_obj_as( + type_=PageColumns, # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def stream_dataset_items( self, *, diff --git a/sdks/python/src/opik/rest_api/llm_provider_key/__init__.py b/sdks/python/src/opik/rest_api/llm_provider_key/__init__.py new file mode 100644 index 0000000000..f3ea2659bb --- /dev/null +++ b/sdks/python/src/opik/rest_api/llm_provider_key/__init__.py @@ -0,0 +1,2 @@ +# This file was auto-generated by Fern from our API Definition. + diff --git a/sdks/python/src/opik/rest_api/llm_provider_key/client.py b/sdks/python/src/opik/rest_api/llm_provider_key/client.py new file mode 100644 index 0000000000..6c25210b67 --- /dev/null +++ b/sdks/python/src/opik/rest_api/llm_provider_key/client.py @@ -0,0 +1,476 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from ..core.client_wrapper import SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.provider_api_key_public import ProviderApiKeyPublic +from ..core.jsonable_encoder import jsonable_encoder +from ..core.pydantic_utilities import parse_obj_as +from ..errors.not_found_error import NotFoundError +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..errors.unauthorized_error import UnauthorizedError +from ..types.error_message import ErrorMessage +from ..errors.forbidden_error import ForbiddenError +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class LlmProviderKeyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def get_llm_provider_api_key_by_id( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> ProviderApiKeyPublic: + """ + Get LLM Provider's ApiKey by id + + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderApiKeyPublic + ProviderApiKey resource + + Examples + -------- + from Opik import OpikApi + + client = OpikApi() + client.llm_provider_key.get_llm_provider_api_key_by_id( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/llm-provider-key/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ProviderApiKeyPublic, + parse_obj_as( + type_=ProviderApiKeyPublic, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def update_llm_provider_api_key( + self, + id: str, + *, + api_key: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Update LLM Provider's ApiKey + + Parameters + ---------- + id : str + + api_key : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from Opik import OpikApi + + client = OpikApi() + client.llm_provider_key.update_llm_provider_api_key( + id="id", + api_key="api_key", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/llm-provider-key/{jsonable_encoder(id)}", + method="PATCH", + json={ + "api_key": api_key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 401: + raise UnauthorizedError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + if _response.status_code == 403: + raise ForbiddenError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + if _response.status_code == 404: + raise NotFoundError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def store_llm_provider_api_key( + self, + *, + api_key: str, + provider: typing.Optional[typing.Literal["openai"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Store LLM Provider's ApiKey + + Parameters + ---------- + api_key : str + + provider : typing.Optional[typing.Literal["openai"]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from Opik import OpikApi + + client = OpikApi() + client.llm_provider_key.store_llm_provider_api_key( + api_key="api_key", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "v1/private/llm-provider-key", + method="POST", + json={ + "provider": provider, + "api_key": api_key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 401: + raise UnauthorizedError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + if _response.status_code == 403: + raise ForbiddenError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncLlmProviderKeyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def get_llm_provider_api_key_by_id( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> ProviderApiKeyPublic: + """ + Get LLM Provider's ApiKey by id + + Parameters + ---------- + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ProviderApiKeyPublic + ProviderApiKey resource + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi() + + + async def main() -> None: + await client.llm_provider_key.get_llm_provider_api_key_by_id( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/llm-provider-key/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + ProviderApiKeyPublic, + parse_obj_as( + type_=ProviderApiKeyPublic, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def update_llm_provider_api_key( + self, + id: str, + *, + api_key: str, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Update LLM Provider's ApiKey + + Parameters + ---------- + id : str + + api_key : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi() + + + async def main() -> None: + await client.llm_provider_key.update_llm_provider_api_key( + id="id", + api_key="api_key", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/llm-provider-key/{jsonable_encoder(id)}", + method="PATCH", + json={ + "api_key": api_key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 401: + raise UnauthorizedError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + if _response.status_code == 403: + raise ForbiddenError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + if _response.status_code == 404: + raise NotFoundError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def store_llm_provider_api_key( + self, + *, + api_key: str, + provider: typing.Optional[typing.Literal["openai"]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Store LLM Provider's ApiKey + + Parameters + ---------- + api_key : str + + provider : typing.Optional[typing.Literal["openai"]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi() + + + async def main() -> None: + await client.llm_provider_key.store_llm_provider_api_key( + api_key="api_key", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/private/llm-provider-key", + method="POST", + json={ + "provider": provider, + "api_key": api_key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + if _response.status_code == 401: + raise UnauthorizedError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + if _response.status_code == 403: + raise ForbiddenError( + typing.cast( + ErrorMessage, + parse_obj_as( + type_=ErrorMessage, # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/sdks/python/src/opik/rest_api/types/__init__.py b/sdks/python/src/opik/rest_api/types/__init__.py index cc8ef8d957..261dd2e83b 100644 --- a/sdks/python/src/opik/rest_api/types/__init__.py +++ b/sdks/python/src/opik/rest_api/types/__init__.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from .assistant_message import AssistantMessage +from .assistant_message_role import AssistantMessageRole from .auth_details_holder import AuthDetailsHolder from .avg_value_stat_public import AvgValueStatPublic from .batch_delete import BatchDelete @@ -13,12 +15,17 @@ from .categorical_feedback_detail_create import CategoricalFeedbackDetailCreate from .categorical_feedback_detail_public import CategoricalFeedbackDetailPublic from .categorical_feedback_detail_update import CategoricalFeedbackDetailUpdate +from .chat_completion_choice import ChatCompletionChoice +from .chat_completion_response import ChatCompletionResponse from .chunked_output_json_node import ChunkedOutputJsonNode from .chunked_output_json_node_type import ChunkedOutputJsonNodeType +from .column import Column from .column_compare import ColumnCompare from .column_compare_types_item import ColumnCompareTypesItem from .column_public import ColumnPublic from .column_public_types_item import ColumnPublicTypesItem +from .column_types_item import ColumnTypesItem +from .completion_tokens_details import CompletionTokensDetails from .count_value_stat_public import CountValueStatPublic from .data_point_number_public import DataPointNumberPublic from .dataset import Dataset @@ -36,6 +43,8 @@ from .dataset_page_public import DatasetPagePublic from .dataset_public import DatasetPublic from .delete_feedback_score import DeleteFeedbackScore +from .delta import Delta +from .delta_role import DeltaRole from .error_message import ErrorMessage from .error_message_detail import ErrorMessageDetail from .error_message_public import ErrorMessagePublic @@ -78,10 +87,17 @@ FeedbackUpdate_Categorical, FeedbackUpdate_Numerical, ) +from .function import Function +from .function_call import FunctionCall from .json_node import JsonNode from .json_node_compare import JsonNodeCompare from .json_node_public import JsonNodePublic from .json_node_write import JsonNodeWrite +from .json_object_schema import JsonObjectSchema +from .json_schema import JsonSchema +from .json_schema_element import JsonSchemaElement +from .message import Message +from .not_implemented_error_body_item import NotImplementedErrorBodyItem from .numerical_feedback_definition import NumericalFeedbackDefinition from .numerical_feedback_definition_create import NumericalFeedbackDefinitionCreate from .numerical_feedback_definition_public import NumericalFeedbackDefinitionPublic @@ -90,6 +106,7 @@ from .numerical_feedback_detail_create import NumericalFeedbackDetailCreate from .numerical_feedback_detail_public import NumericalFeedbackDetailPublic from .numerical_feedback_detail_update import NumericalFeedbackDetailUpdate +from .page_columns import PageColumns from .percentage_value_stat_public import PercentageValueStatPublic from .percentage_values_public import PercentageValuesPublic from .project import Project @@ -118,6 +135,10 @@ from .prompt_version_link_write import PromptVersionLinkWrite from .prompt_version_page_public import PromptVersionPagePublic from .prompt_version_public import PromptVersionPublic +from .provider_api_key import ProviderApiKey +from .provider_api_key_public import ProviderApiKeyPublic +from .response_format import ResponseFormat +from .response_format_type import ResponseFormatType from .results_number_public import ResultsNumberPublic from .span import Span from .span_batch import SpanBatch @@ -127,15 +148,21 @@ from .span_type import SpanType from .span_write import SpanWrite from .span_write_type import SpanWriteType +from .stream_options import StreamOptions +from .tool import Tool +from .tool_call import ToolCall from .trace import Trace from .trace_batch import TraceBatch from .trace_count_response import TraceCountResponse from .trace_page_public import TracePagePublic from .trace_public import TracePublic from .trace_write import TraceWrite +from .usage import Usage from .workspace_trace_count import WorkspaceTraceCount __all__ = [ + "AssistantMessage", + "AssistantMessageRole", "AuthDetailsHolder", "AvgValueStatPublic", "BatchDelete", @@ -149,12 +176,17 @@ "CategoricalFeedbackDetailCreate", "CategoricalFeedbackDetailPublic", "CategoricalFeedbackDetailUpdate", + "ChatCompletionChoice", + "ChatCompletionResponse", "ChunkedOutputJsonNode", "ChunkedOutputJsonNodeType", + "Column", "ColumnCompare", "ColumnCompareTypesItem", "ColumnPublic", "ColumnPublicTypesItem", + "ColumnTypesItem", + "CompletionTokensDetails", "CountValueStatPublic", "DataPointNumberPublic", "Dataset", @@ -172,6 +204,8 @@ "DatasetPagePublic", "DatasetPublic", "DeleteFeedbackScore", + "Delta", + "DeltaRole", "ErrorMessage", "ErrorMessageDetail", "ErrorMessagePublic", @@ -208,10 +242,17 @@ "FeedbackUpdate_Numerical", "Feedback_Categorical", "Feedback_Numerical", + "Function", + "FunctionCall", "JsonNode", "JsonNodeCompare", "JsonNodePublic", "JsonNodeWrite", + "JsonObjectSchema", + "JsonSchema", + "JsonSchemaElement", + "Message", + "NotImplementedErrorBodyItem", "NumericalFeedbackDefinition", "NumericalFeedbackDefinitionCreate", "NumericalFeedbackDefinitionPublic", @@ -220,6 +261,7 @@ "NumericalFeedbackDetailCreate", "NumericalFeedbackDetailPublic", "NumericalFeedbackDetailUpdate", + "PageColumns", "PercentageValueStatPublic", "PercentageValuesPublic", "Project", @@ -244,6 +286,10 @@ "PromptVersionLinkWrite", "PromptVersionPagePublic", "PromptVersionPublic", + "ProviderApiKey", + "ProviderApiKeyPublic", + "ResponseFormat", + "ResponseFormatType", "ResultsNumberPublic", "Span", "SpanBatch", @@ -253,11 +299,15 @@ "SpanType", "SpanWrite", "SpanWriteType", + "StreamOptions", + "Tool", + "ToolCall", "Trace", "TraceBatch", "TraceCountResponse", "TracePagePublic", "TracePublic", "TraceWrite", + "Usage", "WorkspaceTraceCount", ] diff --git a/sdks/python/src/opik/rest_api/types/assistant_message.py b/sdks/python/src/opik/rest_api/types/assistant_message.py new file mode 100644 index 0000000000..b04b3959b9 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/assistant_message.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .assistant_message_role import AssistantMessageRole +from .tool_call import ToolCall +from .function_call import FunctionCall +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class AssistantMessage(UniversalBaseModel): + role: typing.Optional[AssistantMessageRole] = None + content: typing.Optional[str] = None + name: typing.Optional[str] = None + tool_calls: typing.Optional[typing.List[ToolCall]] = None + refusal: typing.Optional[bool] = None + function_call: typing.Optional[FunctionCall] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/assistant_message_role.py b/sdks/python/src/opik/rest_api/types/assistant_message_role.py new file mode 100644 index 0000000000..3a27b89f46 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/assistant_message_role.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AssistantMessageRole = typing.Union[ + typing.Literal["system", "user", "assistant", "tool", "function"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/chat_completion_choice.py b/sdks/python/src/opik/rest_api/types/chat_completion_choice.py new file mode 100644 index 0000000000..16d3dc5e55 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/chat_completion_choice.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .assistant_message import AssistantMessage +from .delta import Delta +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ChatCompletionChoice(UniversalBaseModel): + index: typing.Optional[int] = None + message: typing.Optional[AssistantMessage] = None + delta: typing.Optional[Delta] = None + finish_reason: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/chat_completion_response.py b/sdks/python/src/opik/rest_api/types/chat_completion_response.py new file mode 100644 index 0000000000..a19f76e3ba --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/chat_completion_response.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .chat_completion_choice import ChatCompletionChoice +from .usage import Usage +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ChatCompletionResponse(UniversalBaseModel): + id: typing.Optional[str] = None + created: typing.Optional[int] = None + model: typing.Optional[str] = None + choices: typing.Optional[typing.List[ChatCompletionChoice]] = None + usage: typing.Optional[Usage] = None + system_fingerprint: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/column.py b/sdks/python/src/opik/rest_api/types/column.py new file mode 100644 index 0000000000..db459188d5 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/column.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .column_types_item import ColumnTypesItem +import typing_extensions +from ..core.serialization import FieldMetadata +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 + + +class Column(UniversalBaseModel): + name: typing.Optional[str] = None + types: typing.Optional[typing.List[ColumnTypesItem]] = None + filter_field_prefix: typing.Optional[str] = None + filter_field: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="filterField") + ] = pydantic.Field(default=None) + """ + The field to use for filtering + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/column_compare.py b/sdks/python/src/opik/rest_api/types/column_compare.py index 2050f5bc13..40621349a4 100644 --- a/sdks/python/src/opik/rest_api/types/column_compare.py +++ b/sdks/python/src/opik/rest_api/types/column_compare.py @@ -3,13 +3,22 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing from .column_compare_types_item import ColumnCompareTypesItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.serialization import FieldMetadata import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ColumnCompare(UniversalBaseModel): name: typing.Optional[str] = None types: typing.Optional[typing.List[ColumnCompareTypesItem]] = None + filter_field_prefix: typing.Optional[str] = None + filter_field: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="filterField") + ] = pydantic.Field(default=None) + """ + The field to use for filtering + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/sdks/python/src/opik/rest_api/types/column_public.py b/sdks/python/src/opik/rest_api/types/column_public.py index c99ca5c51b..d04d92f6ef 100644 --- a/sdks/python/src/opik/rest_api/types/column_public.py +++ b/sdks/python/src/opik/rest_api/types/column_public.py @@ -3,13 +3,22 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing from .column_public_types_item import ColumnPublicTypesItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing_extensions +from ..core.serialization import FieldMetadata import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ColumnPublic(UniversalBaseModel): name: typing.Optional[str] = None types: typing.Optional[typing.List[ColumnPublicTypesItem]] = None + filter_field_prefix: typing.Optional[str] = None + filter_field: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="filterField") + ] = pydantic.Field(default=None) + """ + The field to use for filtering + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/sdks/python/src/opik/rest_api/types/column_types_item.py b/sdks/python/src/opik/rest_api/types/column_types_item.py new file mode 100644 index 0000000000..9109c7cd4e --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/column_types_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ColumnTypesItem = typing.Union[ + typing.Literal["string", "number", "object", "boolean", "array", "null"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/completion_tokens_details.py b/sdks/python/src/opik/rest_api/types/completion_tokens_details.py new file mode 100644 index 0000000000..1ee5e366ea --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/completion_tokens_details.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class CompletionTokensDetails(UniversalBaseModel): + reasoning_tokens: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/delta.py b/sdks/python/src/opik/rest_api/types/delta.py new file mode 100644 index 0000000000..d2c9f7dfcf --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/delta.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .delta_role import DeltaRole +from .tool_call import ToolCall +from .function_call import FunctionCall +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class Delta(UniversalBaseModel): + role: typing.Optional[DeltaRole] = None + content: typing.Optional[str] = None + tool_calls: typing.Optional[typing.List[ToolCall]] = None + function_call: typing.Optional[FunctionCall] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/delta_role.py b/sdks/python/src/opik/rest_api/types/delta_role.py new file mode 100644 index 0000000000..ce4ff17785 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/delta_role.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeltaRole = typing.Union[ + typing.Literal["system", "user", "assistant", "tool", "function"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/function.py b/sdks/python/src/opik/rest_api/types/function.py new file mode 100644 index 0000000000..196b7d18ae --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/function.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .json_object_schema import JsonObjectSchema +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class Function(UniversalBaseModel): + name: typing.Optional[str] = None + description: typing.Optional[str] = None + strict: typing.Optional[bool] = None + parameters: typing.Optional[JsonObjectSchema] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/function_call.py b/sdks/python/src/opik/rest_api/types/function_call.py new file mode 100644 index 0000000000..107c69fae2 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/function_call.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class FunctionCall(UniversalBaseModel): + name: typing.Optional[str] = None + arguments: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/json_object_schema.py b/sdks/python/src/opik/rest_api/types/json_object_schema.py new file mode 100644 index 0000000000..932020daf0 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/json_object_schema.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .json_schema_element import JsonSchemaElement +import typing_extensions +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class JsonObjectSchema(UniversalBaseModel): + type: typing.Optional[str] = None + description: typing.Optional[str] = None + properties: typing.Optional[typing.Dict[str, JsonSchemaElement]] = None + required: typing.Optional[typing.List[str]] = None + additional_properties: typing_extensions.Annotated[ + typing.Optional[bool], FieldMetadata(alias="additionalProperties") + ] = None + defs: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, JsonSchemaElement]], + FieldMetadata(alias="$defs"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/json_schema.py b/sdks/python/src/opik/rest_api/types/json_schema.py new file mode 100644 index 0000000000..c841240ceb --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/json_schema.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import typing_extensions +from .json_object_schema import JsonObjectSchema +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class JsonSchema(UniversalBaseModel): + name: typing.Optional[str] = None + strict: typing.Optional[bool] = None + schema_: typing_extensions.Annotated[ + typing.Optional[JsonObjectSchema], FieldMetadata(alias="schema") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/json_schema_element.py b/sdks/python/src/opik/rest_api/types/json_schema_element.py new file mode 100644 index 0000000000..cb238624c0 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/json_schema_element.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class JsonSchemaElement(UniversalBaseModel): + type: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/message.py b/sdks/python/src/opik/rest_api/types/message.py new file mode 100644 index 0000000000..90d85de746 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/message.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +Message = typing.Dict[str, typing.Optional[typing.Any]] diff --git a/sdks/python/src/opik/rest_api/types/not_implemented_error_body_item.py b/sdks/python/src/opik/rest_api/types/not_implemented_error_body_item.py new file mode 100644 index 0000000000..aa025100c0 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/not_implemented_error_body_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from .chat_completion_response import ChatCompletionResponse +from .error_message import ErrorMessage + +NotImplementedErrorBodyItem = typing.Union[ChatCompletionResponse, ErrorMessage] diff --git a/sdks/python/src/opik/rest_api/types/page_columns.py b/sdks/python/src/opik/rest_api/types/page_columns.py new file mode 100644 index 0000000000..0d5933feb5 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/page_columns.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .column import Column +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class PageColumns(UniversalBaseModel): + columns: typing.Optional[typing.List[Column]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/provider_api_key.py b/sdks/python/src/opik/rest_api/types/provider_api_key.py new file mode 100644 index 0000000000..69d642ca7f --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/provider_api_key.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ProviderApiKey(UniversalBaseModel): + id: typing.Optional[str] = None + provider: typing.Optional[typing.Literal["openai"]] = None + api_key: str + created_at: typing.Optional[dt.datetime] = None + created_by: typing.Optional[str] = None + last_updated_at: typing.Optional[dt.datetime] = None + last_updated_by: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/provider_api_key_public.py b/sdks/python/src/opik/rest_api/types/provider_api_key_public.py new file mode 100644 index 0000000000..ec02bca721 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/provider_api_key_public.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ProviderApiKeyPublic(UniversalBaseModel): + id: typing.Optional[str] = None + provider: typing.Optional[typing.Literal["openai"]] = None + created_at: typing.Optional[dt.datetime] = None + created_by: typing.Optional[str] = None + last_updated_at: typing.Optional[dt.datetime] = None + last_updated_by: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/response_format.py b/sdks/python/src/opik/rest_api/types/response_format.py new file mode 100644 index 0000000000..d5eb7f48f6 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/response_format.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .response_format_type import ResponseFormatType +from .json_schema import JsonSchema +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ResponseFormat(UniversalBaseModel): + type: typing.Optional[ResponseFormatType] = None + json_schema: typing.Optional[JsonSchema] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/response_format_type.py b/sdks/python/src/opik/rest_api/types/response_format_type.py new file mode 100644 index 0000000000..2e06b9473d --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/response_format_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ResponseFormatType = typing.Union[ + typing.Literal["text", "json_object", "json_schema"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/stream_options.py b/sdks/python/src/opik/rest_api/types/stream_options.py new file mode 100644 index 0000000000..b54a6c580f --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/stream_options.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class StreamOptions(UniversalBaseModel): + include_usage: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/tool.py b/sdks/python/src/opik/rest_api/types/tool.py new file mode 100644 index 0000000000..1821a799b7 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/tool.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .function import Function +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class Tool(UniversalBaseModel): + type: typing.Optional[typing.Literal["function"]] = None + function: typing.Optional[Function] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/tool_call.py b/sdks/python/src/opik/rest_api/types/tool_call.py new file mode 100644 index 0000000000..45f822bfc3 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/tool_call.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .function_call import FunctionCall +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ToolCall(UniversalBaseModel): + id: typing.Optional[str] = None + index: typing.Optional[int] = None + type: typing.Optional[typing.Literal["function"]] = None + function: typing.Optional[FunctionCall] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/python/src/opik/rest_api/types/usage.py b/sdks/python/src/opik/rest_api/types/usage.py new file mode 100644 index 0000000000..9062965e60 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/usage.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .completion_tokens_details import CompletionTokensDetails +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class Usage(UniversalBaseModel): + total_tokens: typing.Optional[int] = None + prompt_tokens: typing.Optional[int] = None + completion_tokens: typing.Optional[int] = None + completion_tokens_details: typing.Optional[CompletionTokensDetails] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/sdks/typescript/src/opik/rest_api/Client.d.ts b/sdks/typescript/src/opik/rest_api/Client.d.ts index e05dfc3554..422a58284e 100644 --- a/sdks/typescript/src/opik/rest_api/Client.d.ts +++ b/sdks/typescript/src/opik/rest_api/Client.d.ts @@ -5,9 +5,11 @@ import * as environments from "./environments"; import * as core from "./core"; import { SystemUsage } from "./api/resources/systemUsage/client/Client"; import { Check } from "./api/resources/check/client/Client"; +import { ChatCompletions } from "./api/resources/chatCompletions/client/Client"; import { Datasets } from "./api/resources/datasets/client/Client"; import { Experiments } from "./api/resources/experiments/client/Client"; import { FeedbackDefinitions } from "./api/resources/feedbackDefinitions/client/Client"; +import { LlmProviderKey } from "./api/resources/llmProviderKey/client/Client"; import { Projects } from "./api/resources/projects/client/Client"; import { Prompts } from "./api/resources/prompts/client/Client"; import { Spans } from "./api/resources/spans/client/Client"; @@ -48,12 +50,16 @@ export declare class OpikApiClient { get systemUsage(): SystemUsage; protected _check: Check | undefined; get check(): Check; + protected _chatCompletions: ChatCompletions | undefined; + get chatCompletions(): ChatCompletions; protected _datasets: Datasets | undefined; get datasets(): Datasets; protected _experiments: Experiments | undefined; get experiments(): Experiments; protected _feedbackDefinitions: FeedbackDefinitions | undefined; get feedbackDefinitions(): FeedbackDefinitions; + protected _llmProviderKey: LlmProviderKey | undefined; + get llmProviderKey(): LlmProviderKey; protected _projects: Projects | undefined; get projects(): Projects; protected _prompts: Prompts | undefined; diff --git a/sdks/typescript/src/opik/rest_api/Client.js b/sdks/typescript/src/opik/rest_api/Client.js index c7b897777e..deda70045e 100644 --- a/sdks/typescript/src/opik/rest_api/Client.js +++ b/sdks/typescript/src/opik/rest_api/Client.js @@ -45,13 +45,15 @@ const url_join_1 = __importDefault(require("url-join")); const errors = __importStar(require("./errors/index")); const Client_1 = require("./api/resources/systemUsage/client/Client"); const Client_2 = require("./api/resources/check/client/Client"); -const Client_3 = require("./api/resources/datasets/client/Client"); -const Client_4 = require("./api/resources/experiments/client/Client"); -const Client_5 = require("./api/resources/feedbackDefinitions/client/Client"); -const Client_6 = require("./api/resources/projects/client/Client"); -const Client_7 = require("./api/resources/prompts/client/Client"); -const Client_8 = require("./api/resources/spans/client/Client"); -const Client_9 = require("./api/resources/traces/client/Client"); +const Client_3 = require("./api/resources/chatCompletions/client/Client"); +const Client_4 = require("./api/resources/datasets/client/Client"); +const Client_5 = require("./api/resources/experiments/client/Client"); +const Client_6 = require("./api/resources/feedbackDefinitions/client/Client"); +const Client_7 = require("./api/resources/llmProviderKey/client/Client"); +const Client_8 = require("./api/resources/projects/client/Client"); +const Client_9 = require("./api/resources/prompts/client/Client"); +const Client_10 = require("./api/resources/spans/client/Client"); +const Client_11 = require("./api/resources/traces/client/Client"); class OpikApiClient { constructor(_options = {}) { this._options = _options; @@ -158,33 +160,41 @@ class OpikApiClient { var _a; return ((_a = this._check) !== null && _a !== void 0 ? _a : (this._check = new Client_2.Check(this._options))); } + get chatCompletions() { + var _a; + return ((_a = this._chatCompletions) !== null && _a !== void 0 ? _a : (this._chatCompletions = new Client_3.ChatCompletions(this._options))); + } get datasets() { var _a; - return ((_a = this._datasets) !== null && _a !== void 0 ? _a : (this._datasets = new Client_3.Datasets(this._options))); + return ((_a = this._datasets) !== null && _a !== void 0 ? _a : (this._datasets = new Client_4.Datasets(this._options))); } get experiments() { var _a; - return ((_a = this._experiments) !== null && _a !== void 0 ? _a : (this._experiments = new Client_4.Experiments(this._options))); + return ((_a = this._experiments) !== null && _a !== void 0 ? _a : (this._experiments = new Client_5.Experiments(this._options))); } get feedbackDefinitions() { var _a; - return ((_a = this._feedbackDefinitions) !== null && _a !== void 0 ? _a : (this._feedbackDefinitions = new Client_5.FeedbackDefinitions(this._options))); + return ((_a = this._feedbackDefinitions) !== null && _a !== void 0 ? _a : (this._feedbackDefinitions = new Client_6.FeedbackDefinitions(this._options))); + } + get llmProviderKey() { + var _a; + return ((_a = this._llmProviderKey) !== null && _a !== void 0 ? _a : (this._llmProviderKey = new Client_7.LlmProviderKey(this._options))); } get projects() { var _a; - return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_6.Projects(this._options))); + return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_8.Projects(this._options))); } get prompts() { var _a; - return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new Client_7.Prompts(this._options))); + return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new Client_9.Prompts(this._options))); } get spans() { var _a; - return ((_a = this._spans) !== null && _a !== void 0 ? _a : (this._spans = new Client_8.Spans(this._options))); + return ((_a = this._spans) !== null && _a !== void 0 ? _a : (this._spans = new Client_10.Spans(this._options))); } get traces() { var _a; - return ((_a = this._traces) !== null && _a !== void 0 ? _a : (this._traces = new Client_9.Traces(this._options))); + return ((_a = this._traces) !== null && _a !== void 0 ? _a : (this._traces = new Client_11.Traces(this._options))); } } exports.OpikApiClient = OpikApiClient; diff --git a/sdks/typescript/src/opik/rest_api/api/errors/index.d.ts b/sdks/typescript/src/opik/rest_api/api/errors/index.d.ts index f2116ef29f..c806037318 100644 --- a/sdks/typescript/src/opik/rest_api/api/errors/index.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/errors/index.d.ts @@ -1,7 +1,7 @@ export * from "./UnauthorizedError"; export * from "./ForbiddenError"; +export * from "./NotImplementedError"; export * from "./NotFoundError"; export * from "./BadRequestError"; export * from "./UnprocessableEntityError"; export * from "./ConflictError"; -export * from "./NotImplementedError"; diff --git a/sdks/typescript/src/opik/rest_api/api/errors/index.js b/sdks/typescript/src/opik/rest_api/api/errors/index.js index c793da0d10..940522f5f7 100644 --- a/sdks/typescript/src/opik/rest_api/api/errors/index.js +++ b/sdks/typescript/src/opik/rest_api/api/errors/index.js @@ -16,8 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./UnauthorizedError"), exports); __exportStar(require("./ForbiddenError"), exports); +__exportStar(require("./NotImplementedError"), exports); __exportStar(require("./NotFoundError"), exports); __exportStar(require("./BadRequestError"), exports); __exportStar(require("./UnprocessableEntityError"), exports); __exportStar(require("./ConflictError"), exports); -__exportStar(require("./NotImplementedError"), exports); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/Client.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/Client.d.ts new file mode 100644 index 0000000000..62962d94c7 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/Client.d.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as OpikApi from "../../../index"; +export declare namespace ChatCompletions { + interface Options { + environment?: core.Supplier; + } + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} +/** + * Chat Completions related resources + */ +export declare class ChatCompletions { + protected readonly _options: ChatCompletions.Options; + constructor(_options?: ChatCompletions.Options); + /** + * Get chat completions + * + * @param {OpikApi.ChatCompletionRequest} request + * @param {ChatCompletions.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.NotImplementedError} + * + * @example + * await client.chatCompletions.getChatCompletions() + */ + getChatCompletions(request?: OpikApi.ChatCompletionRequest, requestOptions?: ChatCompletions.RequestOptions): core.APIPromise; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/Client.js b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/Client.js new file mode 100644 index 0000000000..fa8c96e546 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/Client.js @@ -0,0 +1,114 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletions = void 0; +const environments = __importStar(require("../../../../environments")); +const core = __importStar(require("../../../../core")); +const OpikApi = __importStar(require("../../../index")); +const serializers = __importStar(require("../../../../serialization/index")); +const url_join_1 = __importDefault(require("url-join")); +const errors = __importStar(require("../../../../errors/index")); +/** + * Chat Completions related resources + */ +class ChatCompletions { + constructor(_options = {}) { + this._options = _options; + } + /** + * Get chat completions + * + * @param {OpikApi.ChatCompletionRequest} request + * @param {ChatCompletions.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.NotImplementedError} + * + * @example + * await client.chatCompletions.getChatCompletions() + */ + getChatCompletions(request = {}, requestOptions) { + return core.APIPromise.from((() => __awaiter(this, void 0, void 0, function* () { + var _a; + const _response = yield core.fetcher({ + url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.OpikApiEnvironment.Default, "v1/private/chat/completions"), + method: "POST", + headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers), + contentType: "application/json", + requestType: "json", + body: serializers.ChatCompletionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: undefined, + headers: _response.headers, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 501: + throw new OpikApi.NotImplementedError(_response.error.body); + default: + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + switch (_response.error.reason) { + case "non-json": + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.OpikApiTimeoutError("Timeout exceeded when calling POST /v1/private/chat/completions."); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + }))()); + } +} +exports.ChatCompletions = ChatCompletions; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/index.d.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/index.d.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/index.js b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/index.js new file mode 100644 index 0000000000..6df4ebb9ef --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./requests"), exports); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.d.ts new file mode 100644 index 0000000000..40139bf4ed --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.d.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../../../../index"; +/** + * @example + * {} + */ +export interface ChatCompletionRequest { + model?: string; + messages?: OpikApi.Message[]; + temperature?: number; + topP?: number; + n?: number; + stream?: boolean; + streamOptions?: OpikApi.StreamOptions; + stop?: string[]; + maxTokens?: number; + maxCompletionTokens?: number; + presencePenalty?: number; + frequencyPenalty?: number; + logitBias?: Record; + user?: string; + responseFormat?: OpikApi.ResponseFormat; + seed?: number; + tools?: OpikApi.Tool[]; + toolChoice?: Record; + parallelToolCalls?: boolean; + functions?: OpikApi.Function[]; + functionCall?: OpikApi.FunctionCall; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.js b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.d.ts new file mode 100644 index 0000000000..5c5a736c0d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.d.ts @@ -0,0 +1 @@ +export { type ChatCompletionRequest } from "./ChatCompletionRequest"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.js b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.js new file mode 100644 index 0000000000..c8ad2e549b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/index.d.ts new file mode 100644 index 0000000000..5ec76921e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/index.d.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/index.js b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/index.js new file mode 100644 index 0000000000..352398aff9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/chatCompletions/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./client"), exports); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.d.ts index 01b4908f70..607cff9d50 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.d.ts @@ -178,6 +178,17 @@ export declare class Datasets { * await client.datasets.getDatasetItems("id") */ getDatasetItems(id: string, request?: OpikApi.GetDatasetItemsRequest, requestOptions?: Datasets.RequestOptions): core.APIPromise; + /** + * Get dataset items output columns + * + * @param {string} id + * @param {OpikApi.GetDatasetItemsOutputColumnsRequest} request + * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.datasets.getDatasetItemsOutputColumns("id") + */ + getDatasetItemsOutputColumns(id: string, request?: OpikApi.GetDatasetItemsOutputColumnsRequest, requestOptions?: Datasets.RequestOptions): core.APIPromise; /** * Stream dataset items */ diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.js b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.js index 5301d2f31a..8a2ad328dd 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.js +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.js @@ -808,6 +808,68 @@ class Datasets { } }))()); } + /** + * Get dataset items output columns + * + * @param {string} id + * @param {OpikApi.GetDatasetItemsOutputColumnsRequest} request + * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.datasets.getDatasetItemsOutputColumns("id") + */ + getDatasetItemsOutputColumns(id, request = {}, requestOptions) { + return core.APIPromise.from((() => __awaiter(this, void 0, void 0, function* () { + var _a; + const { experimentIds } = request; + const _queryParams = {}; + if (experimentIds != null) { + _queryParams["experiment_ids"] = experimentIds; + } + const _response = yield core.fetcher({ + url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.OpikApiEnvironment.Default, `v1/private/datasets/${encodeURIComponent(id)}/items/experiments/items/output/columns`), + method: "GET", + headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers), + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: serializers.PageColumns.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + headers: _response.headers, + }; + } + if (_response.error.reason === "status-code") { + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + switch (_response.error.reason) { + case "non-json": + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.OpikApiTimeoutError("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns."); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + }))()); + } /** * Stream dataset items */ diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.d.ts new file mode 100644 index 0000000000..dbd2a192a4 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +/** + * @example + * {} + */ +export interface GetDatasetItemsOutputColumnsRequest { + experimentIds?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.js b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/index.d.ts index 11c05da024..e54bfd35ca 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/index.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/index.d.ts @@ -7,4 +7,5 @@ export { type DatasetItemsDelete } from "./DatasetItemsDelete"; export { type FindDatasetItemsWithExperimentItemsRequest } from "./FindDatasetItemsWithExperimentItemsRequest"; export { type DatasetIdentifierPublic } from "./DatasetIdentifierPublic"; export { type GetDatasetItemsRequest } from "./GetDatasetItemsRequest"; +export { type GetDatasetItemsOutputColumnsRequest } from "./GetDatasetItemsOutputColumnsRequest"; export { type DatasetItemStreamRequest } from "./DatasetItemStreamRequest"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/index.d.ts index fe0312f3a3..5730f9e41b 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/index.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/index.d.ts @@ -6,13 +6,17 @@ export * as spans from "./spans"; export * from "./spans/types"; export * as systemUsage from "./systemUsage"; export * as check from "./check"; +export * as chatCompletions from "./chatCompletions"; export * as datasets from "./datasets"; export * as experiments from "./experiments"; +export * as llmProviderKey from "./llmProviderKey"; export * as prompts from "./prompts"; export * as traces from "./traces"; +export * from "./chatCompletions/client/requests"; export * from "./datasets/client/requests"; export * from "./experiments/client/requests"; export * from "./feedbackDefinitions/client/requests"; +export * from "./llmProviderKey/client/requests"; export * from "./projects/client/requests"; export * from "./prompts/client/requests"; export * from "./spans/client/requests"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/index.js b/sdks/typescript/src/opik/rest_api/api/resources/index.js index 5348add8fc..3028d7ff85 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/index.js +++ b/sdks/typescript/src/opik/rest_api/api/resources/index.js @@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.traces = exports.prompts = exports.experiments = exports.datasets = exports.check = exports.systemUsage = exports.spans = exports.projects = exports.feedbackDefinitions = void 0; +exports.traces = exports.prompts = exports.llmProviderKey = exports.experiments = exports.datasets = exports.chatCompletions = exports.check = exports.systemUsage = exports.spans = exports.projects = exports.feedbackDefinitions = void 0; exports.feedbackDefinitions = __importStar(require("./feedbackDefinitions")); __exportStar(require("./feedbackDefinitions/types"), exports); exports.projects = __importStar(require("./projects")); @@ -35,13 +35,17 @@ exports.spans = __importStar(require("./spans")); __exportStar(require("./spans/types"), exports); exports.systemUsage = __importStar(require("./systemUsage")); exports.check = __importStar(require("./check")); +exports.chatCompletions = __importStar(require("./chatCompletions")); exports.datasets = __importStar(require("./datasets")); exports.experiments = __importStar(require("./experiments")); +exports.llmProviderKey = __importStar(require("./llmProviderKey")); exports.prompts = __importStar(require("./prompts")); exports.traces = __importStar(require("./traces")); +__exportStar(require("./chatCompletions/client/requests"), exports); __exportStar(require("./datasets/client/requests"), exports); __exportStar(require("./experiments/client/requests"), exports); __exportStar(require("./feedbackDefinitions/client/requests"), exports); +__exportStar(require("./llmProviderKey/client/requests"), exports); __exportStar(require("./projects/client/requests"), exports); __exportStar(require("./prompts/client/requests"), exports); __exportStar(require("./spans/client/requests"), exports); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.d.ts new file mode 100644 index 0000000000..574d28eea6 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.d.ts @@ -0,0 +1,72 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as OpikApi from "../../../index"; +export declare namespace LlmProviderKey { + interface Options { + environment?: core.Supplier; + } + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} +/** + * LLM Provider Key + */ +export declare class LlmProviderKey { + protected readonly _options: LlmProviderKey.Options; + constructor(_options?: LlmProviderKey.Options); + /** + * Get LLM Provider's ApiKey by id + * + * @param {string} id + * @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.NotFoundError} + * + * @example + * await client.llmProviderKey.getLlmProviderApiKeyById("id") + */ + getLlmProviderApiKeyById(id: string, requestOptions?: LlmProviderKey.RequestOptions): core.APIPromise; + /** + * Update LLM Provider's ApiKey + * + * @param {string} id + * @param {OpikApi.ProviderApiKeyUpdate} request + * @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.UnauthorizedError} + * @throws {@link OpikApi.ForbiddenError} + * @throws {@link OpikApi.NotFoundError} + * + * @example + * await client.llmProviderKey.updateLlmProviderApiKey("id", { + * apiKey: "api_key" + * }) + */ + updateLlmProviderApiKey(id: string, request: OpikApi.ProviderApiKeyUpdate, requestOptions?: LlmProviderKey.RequestOptions): core.APIPromise; + /** + * Store LLM Provider's ApiKey + * + * @param {OpikApi.ProviderApiKeyWrite} request + * @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.UnauthorizedError} + * @throws {@link OpikApi.ForbiddenError} + * + * @example + * await client.llmProviderKey.storeLlmProviderApiKey({ + * apiKey: "api_key" + * }) + */ + storeLlmProviderApiKey(request: OpikApi.ProviderApiKeyWrite, requestOptions?: LlmProviderKey.RequestOptions): core.APIPromise; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.js b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.js new file mode 100644 index 0000000000..4a0bd45c9b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.js @@ -0,0 +1,268 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LlmProviderKey = void 0; +const environments = __importStar(require("../../../../environments")); +const core = __importStar(require("../../../../core")); +const OpikApi = __importStar(require("../../../index")); +const url_join_1 = __importDefault(require("url-join")); +const serializers = __importStar(require("../../../../serialization/index")); +const errors = __importStar(require("../../../../errors/index")); +/** + * LLM Provider Key + */ +class LlmProviderKey { + constructor(_options = {}) { + this._options = _options; + } + /** + * Get LLM Provider's ApiKey by id + * + * @param {string} id + * @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.NotFoundError} + * + * @example + * await client.llmProviderKey.getLlmProviderApiKeyById("id") + */ + getLlmProviderApiKeyById(id, requestOptions) { + return core.APIPromise.from((() => __awaiter(this, void 0, void 0, function* () { + var _a; + const _response = yield core.fetcher({ + url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.OpikApiEnvironment.Default, `v1/private/llm-provider-key/${encodeURIComponent(id)}`), + method: "GET", + headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers), + contentType: "application/json", + requestType: "json", + timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: serializers.ProviderApiKeyPublic.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + headers: _response.headers, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 404: + throw new OpikApi.NotFoundError(_response.error.body); + default: + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + switch (_response.error.reason) { + case "non-json": + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.OpikApiTimeoutError("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}."); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + }))()); + } + /** + * Update LLM Provider's ApiKey + * + * @param {string} id + * @param {OpikApi.ProviderApiKeyUpdate} request + * @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.UnauthorizedError} + * @throws {@link OpikApi.ForbiddenError} + * @throws {@link OpikApi.NotFoundError} + * + * @example + * await client.llmProviderKey.updateLlmProviderApiKey("id", { + * apiKey: "api_key" + * }) + */ + updateLlmProviderApiKey(id, request, requestOptions) { + return core.APIPromise.from((() => __awaiter(this, void 0, void 0, function* () { + var _a; + const _response = yield core.fetcher({ + url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.OpikApiEnvironment.Default, `v1/private/llm-provider-key/${encodeURIComponent(id)}`), + method: "PATCH", + headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers), + contentType: "application/json", + requestType: "json", + body: serializers.ProviderApiKeyUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: undefined, + headers: _response.headers, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new OpikApi.UnauthorizedError(serializers.ErrorMessage.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + })); + case 403: + throw new OpikApi.ForbiddenError(serializers.ErrorMessage.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + })); + case 404: + throw new OpikApi.NotFoundError(_response.error.body); + default: + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + switch (_response.error.reason) { + case "non-json": + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.OpikApiTimeoutError("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}."); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + }))()); + } + /** + * Store LLM Provider's ApiKey + * + * @param {OpikApi.ProviderApiKeyWrite} request + * @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link OpikApi.UnauthorizedError} + * @throws {@link OpikApi.ForbiddenError} + * + * @example + * await client.llmProviderKey.storeLlmProviderApiKey({ + * apiKey: "api_key" + * }) + */ + storeLlmProviderApiKey(request, requestOptions) { + return core.APIPromise.from((() => __awaiter(this, void 0, void 0, function* () { + var _a; + const _response = yield core.fetcher({ + url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.OpikApiEnvironment.Default, "v1/private/llm-provider-key"), + method: "POST", + headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers), + contentType: "application/json", + requestType: "json", + body: serializers.ProviderApiKeyWrite.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: undefined, + headers: _response.headers, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new OpikApi.UnauthorizedError(serializers.ErrorMessage.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + })); + case 403: + throw new OpikApi.ForbiddenError(serializers.ErrorMessage.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + })); + default: + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + switch (_response.error.reason) { + case "non-json": + throw new errors.OpikApiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.OpikApiTimeoutError("Timeout exceeded when calling POST /v1/private/llm-provider-key."); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + }))()); + } +} +exports.LlmProviderKey = LlmProviderKey; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/index.d.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/index.d.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/index.js b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/index.js new file mode 100644 index 0000000000..6df4ebb9ef --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./requests"), exports); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.d.ts new file mode 100644 index 0000000000..5c05f35533 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +/** + * @example + * { + * apiKey: "api_key" + * } + */ +export interface ProviderApiKeyUpdate { + apiKey: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.js b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.d.ts new file mode 100644 index 0000000000..dacee7c6fc --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.d.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +/** + * @example + * { + * apiKey: "api_key" + * } + */ +export interface ProviderApiKeyWrite { + provider?: "openai"; + apiKey: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.js b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.d.ts new file mode 100644 index 0000000000..f8148e829e --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.d.ts @@ -0,0 +1,2 @@ +export { type ProviderApiKeyUpdate } from "./ProviderApiKeyUpdate"; +export { type ProviderApiKeyWrite } from "./ProviderApiKeyWrite"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.js b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.js new file mode 100644 index 0000000000..c8ad2e549b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.d.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.d.ts new file mode 100644 index 0000000000..5ec76921e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.d.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.js b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.js new file mode 100644 index 0000000000..352398aff9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./client"), exports); diff --git a/sdks/typescript/src/opik/rest_api/api/types/AssistantMessage.d.ts b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessage.d.ts new file mode 100644 index 0000000000..92b9ab50a7 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessage.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface AssistantMessage { + role?: OpikApi.AssistantMessageRole; + content?: string; + name?: string; + toolCalls?: OpikApi.ToolCall[]; + refusal?: boolean; + functionCall?: OpikApi.FunctionCall; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AssistantMessage.js b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessage.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessage.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/AssistantMessageRole.d.ts b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessageRole.d.ts new file mode 100644 index 0000000000..7699f80872 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessageRole.d.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export declare type AssistantMessageRole = "system" | "user" | "assistant" | "tool" | "function"; +export declare const AssistantMessageRole: { + readonly System: "system"; + readonly User: "user"; + readonly Assistant: "assistant"; + readonly Tool: "tool"; + readonly Function: "function"; +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/AssistantMessageRole.js b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessageRole.js new file mode 100644 index 0000000000..02b6bf87f6 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AssistantMessageRole.js @@ -0,0 +1,13 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AssistantMessageRole = void 0; +exports.AssistantMessageRole = { + System: "system", + User: "user", + Assistant: "assistant", + Tool: "tool", + Function: "function", +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionChoice.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionChoice.d.ts new file mode 100644 index 0000000000..9e0cddc27c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionChoice.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface ChatCompletionChoice { + index?: number; + message?: OpikApi.AssistantMessage; + delta?: OpikApi.Delta; + finishReason?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionChoice.js b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionChoice.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionChoice.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionResponse.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionResponse.d.ts new file mode 100644 index 0000000000..0020fee651 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionResponse.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface ChatCompletionResponse { + id?: string; + created?: number; + model?: string; + choices?: OpikApi.ChatCompletionChoice[]; + usage?: OpikApi.Usage; + systemFingerprint?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionResponse.js b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionResponse.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ChatCompletionResponse.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/Column.d.ts b/sdks/typescript/src/opik/rest_api/api/types/Column.d.ts new file mode 100644 index 0000000000..f486ab2eb5 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Column.d.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface Column { + name?: string; + types?: OpikApi.ColumnTypesItem[]; + filterFieldPrefix?: string; + /** The field to use for filtering */ + filterField?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Column.js b/sdks/typescript/src/opik/rest_api/api/types/Column.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Column.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ColumnCompare.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ColumnCompare.d.ts index b6882d6e1d..551a297156 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/ColumnCompare.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/ColumnCompare.d.ts @@ -5,4 +5,7 @@ import * as OpikApi from "../index"; export interface ColumnCompare { name?: string; types?: OpikApi.ColumnCompareTypesItem[]; + filterFieldPrefix?: string; + /** The field to use for filtering */ + filterField?: string; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/ColumnPublic.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ColumnPublic.d.ts index 614b3d966d..66946e2766 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/ColumnPublic.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/ColumnPublic.d.ts @@ -5,4 +5,7 @@ import * as OpikApi from "../index"; export interface ColumnPublic { name?: string; types?: OpikApi.ColumnPublicTypesItem[]; + filterFieldPrefix?: string; + /** The field to use for filtering */ + filterField?: string; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/ColumnTypesItem.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ColumnTypesItem.d.ts new file mode 100644 index 0000000000..ec28f44e58 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ColumnTypesItem.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export declare type ColumnTypesItem = "string" | "number" | "object" | "boolean" | "array" | "null"; +export declare const ColumnTypesItem: { + readonly String: "string"; + readonly Number: "number"; + readonly Object: "object"; + readonly Boolean: "boolean"; + readonly Array: "array"; + readonly Null: "null"; +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ColumnTypesItem.js b/sdks/typescript/src/opik/rest_api/api/types/ColumnTypesItem.js new file mode 100644 index 0000000000..fb5428f380 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ColumnTypesItem.js @@ -0,0 +1,14 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColumnTypesItem = void 0; +exports.ColumnTypesItem = { + String: "string", + Number: "number", + Object: "object", + Boolean: "boolean", + Array: "array", + Null: "null", +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/CompletionTokensDetails.d.ts b/sdks/typescript/src/opik/rest_api/api/types/CompletionTokensDetails.d.ts new file mode 100644 index 0000000000..d7d8b11391 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/CompletionTokensDetails.d.ts @@ -0,0 +1,6 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export interface CompletionTokensDetails { + reasoningTokens?: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/CompletionTokensDetails.js b/sdks/typescript/src/opik/rest_api/api/types/CompletionTokensDetails.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/CompletionTokensDetails.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/Delta.d.ts b/sdks/typescript/src/opik/rest_api/api/types/Delta.d.ts new file mode 100644 index 0000000000..08eba6d4ef --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Delta.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface Delta { + role?: OpikApi.DeltaRole; + content?: string; + toolCalls?: OpikApi.ToolCall[]; + functionCall?: OpikApi.FunctionCall; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Delta.js b/sdks/typescript/src/opik/rest_api/api/types/Delta.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Delta.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/DeltaRole.d.ts b/sdks/typescript/src/opik/rest_api/api/types/DeltaRole.d.ts new file mode 100644 index 0000000000..e368edaf74 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/DeltaRole.d.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export declare type DeltaRole = "system" | "user" | "assistant" | "tool" | "function"; +export declare const DeltaRole: { + readonly System: "system"; + readonly User: "user"; + readonly Assistant: "assistant"; + readonly Tool: "tool"; + readonly Function: "function"; +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/DeltaRole.js b/sdks/typescript/src/opik/rest_api/api/types/DeltaRole.js new file mode 100644 index 0000000000..be3847047f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/DeltaRole.js @@ -0,0 +1,13 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DeltaRole = void 0; +exports.DeltaRole = { + System: "system", + User: "user", + Assistant: "assistant", + Tool: "tool", + Function: "function", +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/Function.d.ts b/sdks/typescript/src/opik/rest_api/api/types/Function.d.ts new file mode 100644 index 0000000000..e135fb12df --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Function.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface Function { + name?: string; + description?: string; + strict?: boolean; + parameters?: OpikApi.JsonObjectSchema; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Function.js b/sdks/typescript/src/opik/rest_api/api/types/Function.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Function.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/FunctionCall.d.ts b/sdks/typescript/src/opik/rest_api/api/types/FunctionCall.d.ts new file mode 100644 index 0000000000..99fe32eaab --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/FunctionCall.d.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export interface FunctionCall { + name?: string; + arguments?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/FunctionCall.js b/sdks/typescript/src/opik/rest_api/api/types/FunctionCall.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/FunctionCall.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/JsonObjectSchema.d.ts b/sdks/typescript/src/opik/rest_api/api/types/JsonObjectSchema.d.ts new file mode 100644 index 0000000000..e076c6cefd --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/JsonObjectSchema.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface JsonObjectSchema { + type?: string; + description?: string; + properties?: Record; + required?: string[]; + additionalProperties?: boolean; + defs?: Record; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/JsonObjectSchema.js b/sdks/typescript/src/opik/rest_api/api/types/JsonObjectSchema.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/JsonObjectSchema.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/JsonSchema.d.ts b/sdks/typescript/src/opik/rest_api/api/types/JsonSchema.d.ts new file mode 100644 index 0000000000..f28bba7f9a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/JsonSchema.d.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface JsonSchema { + name?: string; + strict?: boolean; + schema?: OpikApi.JsonObjectSchema; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/JsonSchema.js b/sdks/typescript/src/opik/rest_api/api/types/JsonSchema.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/JsonSchema.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/JsonSchemaElement.d.ts b/sdks/typescript/src/opik/rest_api/api/types/JsonSchemaElement.d.ts new file mode 100644 index 0000000000..98f97adbb0 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/JsonSchemaElement.d.ts @@ -0,0 +1,6 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export interface JsonSchemaElement { + type?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/JsonSchemaElement.js b/sdks/typescript/src/opik/rest_api/api/types/JsonSchemaElement.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/JsonSchemaElement.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/Message.d.ts b/sdks/typescript/src/opik/rest_api/api/types/Message.d.ts new file mode 100644 index 0000000000..a67f48e42f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Message.d.ts @@ -0,0 +1,4 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export declare type Message = Record; diff --git a/sdks/typescript/src/opik/rest_api/api/types/Message.js b/sdks/typescript/src/opik/rest_api/api/types/Message.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Message.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/NotImplementedErrorBodyItem.d.ts b/sdks/typescript/src/opik/rest_api/api/types/NotImplementedErrorBodyItem.d.ts new file mode 100644 index 0000000000..c44de03984 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/NotImplementedErrorBodyItem.d.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export declare type NotImplementedErrorBodyItem = OpikApi.ChatCompletionResponse | OpikApi.ErrorMessage; diff --git a/sdks/typescript/src/opik/rest_api/api/types/NotImplementedErrorBodyItem.js b/sdks/typescript/src/opik/rest_api/api/types/NotImplementedErrorBodyItem.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/NotImplementedErrorBodyItem.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/PageColumns.d.ts b/sdks/typescript/src/opik/rest_api/api/types/PageColumns.d.ts new file mode 100644 index 0000000000..1ad718703a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/PageColumns.d.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface PageColumns { + columns?: OpikApi.Column[]; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/PageColumns.js b/sdks/typescript/src/opik/rest_api/api/types/PageColumns.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/PageColumns.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.d.ts new file mode 100644 index 0000000000..c18d1ea8ab --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export interface ProviderApiKey { + id?: string; + provider?: "openai"; + apiKey: string; + createdAt?: Date; + createdBy?: string; + lastUpdatedAt?: Date; + lastUpdatedBy?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.js b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.d.ts new file mode 100644 index 0000000000..ba777392ee --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.d.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export interface ProviderApiKeyPublic { + id?: string; + provider?: "openai"; + createdAt?: Date; + createdBy?: string; + lastUpdatedAt?: Date; + lastUpdatedBy?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.js b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ResponseFormat.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormat.d.ts new file mode 100644 index 0000000000..82e259b50a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormat.d.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface ResponseFormat { + type?: OpikApi.ResponseFormatType; + jsonSchema?: OpikApi.JsonSchema; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/ResponseFormat.js b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormat.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormat.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ResponseFormatType.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormatType.d.ts new file mode 100644 index 0000000000..30d7c7bbfb --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormatType.d.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export declare type ResponseFormatType = "text" | "json_object" | "json_schema"; +export declare const ResponseFormatType: { + readonly Text: "text"; + readonly JsonObject: "json_object"; + readonly JsonSchema: "json_schema"; +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ResponseFormatType.js b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormatType.js new file mode 100644 index 0000000000..c511e92676 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ResponseFormatType.js @@ -0,0 +1,11 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResponseFormatType = void 0; +exports.ResponseFormatType = { + Text: "text", + JsonObject: "json_object", + JsonSchema: "json_schema", +}; diff --git a/sdks/typescript/src/opik/rest_api/api/types/StreamOptions.d.ts b/sdks/typescript/src/opik/rest_api/api/types/StreamOptions.d.ts new file mode 100644 index 0000000000..fbf4082fa0 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/StreamOptions.d.ts @@ -0,0 +1,6 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export interface StreamOptions { + includeUsage?: boolean; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/StreamOptions.js b/sdks/typescript/src/opik/rest_api/api/types/StreamOptions.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/StreamOptions.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/Tool.d.ts b/sdks/typescript/src/opik/rest_api/api/types/Tool.d.ts new file mode 100644 index 0000000000..15c6482a0d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Tool.d.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface Tool { + type?: "function"; + function?: OpikApi.Function; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Tool.js b/sdks/typescript/src/opik/rest_api/api/types/Tool.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Tool.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/ToolCall.d.ts b/sdks/typescript/src/opik/rest_api/api/types/ToolCall.d.ts new file mode 100644 index 0000000000..0fb06800af --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ToolCall.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface ToolCall { + id?: string; + index?: number; + type?: "function"; + function?: OpikApi.FunctionCall; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/ToolCall.js b/sdks/typescript/src/opik/rest_api/api/types/ToolCall.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ToolCall.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/Usage.d.ts b/sdks/typescript/src/opik/rest_api/api/types/Usage.d.ts new file mode 100644 index 0000000000..adb76b7275 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Usage.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as OpikApi from "../index"; +export interface Usage { + totalTokens?: number; + promptTokens?: number; + completionTokens?: number; + completionTokensDetails?: OpikApi.CompletionTokensDetails; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Usage.js b/sdks/typescript/src/opik/rest_api/api/types/Usage.js new file mode 100644 index 0000000000..33e43da19c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/Usage.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/sdks/typescript/src/opik/rest_api/api/types/index.d.ts b/sdks/typescript/src/opik/rest_api/api/types/index.d.ts index 663ead306f..db484b3b73 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/index.d.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/index.d.ts @@ -1,9 +1,29 @@ +export * from "./NotImplementedErrorBodyItem"; export * from "./BiInformation"; export * from "./BiInformationResponse"; export * from "./TraceCountResponse"; export * from "./WorkspaceTraceCount"; export * from "./ErrorMessage"; export * from "./AuthDetailsHolder"; +export * from "./AssistantMessageRole"; +export * from "./AssistantMessage"; +export * from "./ChatCompletionChoice"; +export * from "./ChatCompletionResponse"; +export * from "./CompletionTokensDetails"; +export * from "./DeltaRole"; +export * from "./Delta"; +export * from "./FunctionCall"; +export * from "./ToolCall"; +export * from "./Usage"; +export * from "./Function"; +export * from "./JsonObjectSchema"; +export * from "./JsonSchema"; +export * from "./JsonSchemaElement"; +export * from "./Message"; +export * from "./ResponseFormatType"; +export * from "./ResponseFormat"; +export * from "./StreamOptions"; +export * from "./Tool"; export * from "./Dataset"; export * from "./DatasetItemSource"; export * from "./DatasetItem"; @@ -34,6 +54,9 @@ export * from "./JsonNodePublic"; export * from "./ColumnPublicTypesItem"; export * from "./ColumnPublic"; export * from "./DatasetItemPagePublic"; +export * from "./ColumnTypesItem"; +export * from "./Column"; +export * from "./PageColumns"; export * from "./ChunkedOutputJsonNodeType"; export * from "./ChunkedOutputJsonNode"; export * from "./Experiment"; @@ -67,6 +90,8 @@ export * from "./CategoricalFeedbackDetailUpdate"; export * from "./FeedbackUpdate"; export * from "./NumericalFeedbackDefinitionUpdate"; export * from "./NumericalFeedbackDetailUpdate"; +export * from "./ProviderApiKeyPublic"; +export * from "./ProviderApiKey"; export * from "./Project"; export * from "./ProjectPagePublic"; export * from "./ProjectPublic"; diff --git a/sdks/typescript/src/opik/rest_api/api/types/index.js b/sdks/typescript/src/opik/rest_api/api/types/index.js index 0ff43b3bf1..9f87a98a0d 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/index.js +++ b/sdks/typescript/src/opik/rest_api/api/types/index.js @@ -14,12 +14,32 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./NotImplementedErrorBodyItem"), exports); __exportStar(require("./BiInformation"), exports); __exportStar(require("./BiInformationResponse"), exports); __exportStar(require("./TraceCountResponse"), exports); __exportStar(require("./WorkspaceTraceCount"), exports); __exportStar(require("./ErrorMessage"), exports); __exportStar(require("./AuthDetailsHolder"), exports); +__exportStar(require("./AssistantMessageRole"), exports); +__exportStar(require("./AssistantMessage"), exports); +__exportStar(require("./ChatCompletionChoice"), exports); +__exportStar(require("./ChatCompletionResponse"), exports); +__exportStar(require("./CompletionTokensDetails"), exports); +__exportStar(require("./DeltaRole"), exports); +__exportStar(require("./Delta"), exports); +__exportStar(require("./FunctionCall"), exports); +__exportStar(require("./ToolCall"), exports); +__exportStar(require("./Usage"), exports); +__exportStar(require("./Function"), exports); +__exportStar(require("./JsonObjectSchema"), exports); +__exportStar(require("./JsonSchema"), exports); +__exportStar(require("./JsonSchemaElement"), exports); +__exportStar(require("./Message"), exports); +__exportStar(require("./ResponseFormatType"), exports); +__exportStar(require("./ResponseFormat"), exports); +__exportStar(require("./StreamOptions"), exports); +__exportStar(require("./Tool"), exports); __exportStar(require("./Dataset"), exports); __exportStar(require("./DatasetItemSource"), exports); __exportStar(require("./DatasetItem"), exports); @@ -50,6 +70,9 @@ __exportStar(require("./JsonNodePublic"), exports); __exportStar(require("./ColumnPublicTypesItem"), exports); __exportStar(require("./ColumnPublic"), exports); __exportStar(require("./DatasetItemPagePublic"), exports); +__exportStar(require("./ColumnTypesItem"), exports); +__exportStar(require("./Column"), exports); +__exportStar(require("./PageColumns"), exports); __exportStar(require("./ChunkedOutputJsonNodeType"), exports); __exportStar(require("./ChunkedOutputJsonNode"), exports); __exportStar(require("./Experiment"), exports); @@ -83,6 +106,8 @@ __exportStar(require("./CategoricalFeedbackDetailUpdate"), exports); __exportStar(require("./FeedbackUpdate"), exports); __exportStar(require("./NumericalFeedbackDefinitionUpdate"), exports); __exportStar(require("./NumericalFeedbackDetailUpdate"), exports); +__exportStar(require("./ProviderApiKeyPublic"), exports); +__exportStar(require("./ProviderApiKey"), exports); __exportStar(require("./Project"), exports); __exportStar(require("./ProjectPagePublic"), exports); __exportStar(require("./ProjectPublic"), exports); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/index.d.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/index.d.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/index.js new file mode 100644 index 0000000000..6df4ebb9ef --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./requests"), exports); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.d.ts new file mode 100644 index 0000000000..1aceac8242 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.d.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../../../../index"; +import * as OpikApi from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { Message } from "../../../../types/Message"; +import { StreamOptions } from "../../../../types/StreamOptions"; +import { ResponseFormat } from "../../../../types/ResponseFormat"; +import { Tool } from "../../../../types/Tool"; +import { Function } from "../../../../types/Function"; +import { FunctionCall } from "../../../../types/FunctionCall"; +export declare const ChatCompletionRequest: core.serialization.Schema; +export declare namespace ChatCompletionRequest { + interface Raw { + model?: string | null; + messages?: Message.Raw[] | null; + temperature?: number | null; + top_p?: number | null; + n?: number | null; + stream?: boolean | null; + stream_options?: StreamOptions.Raw | null; + stop?: string[] | null; + max_tokens?: number | null; + max_completion_tokens?: number | null; + presence_penalty?: number | null; + frequency_penalty?: number | null; + logit_bias?: Record | null; + user?: string | null; + response_format?: ResponseFormat.Raw | null; + seed?: number | null; + tools?: Tool.Raw[] | null; + tool_choice?: Record | null; + parallel_tool_calls?: boolean | null; + functions?: Function.Raw[] | null; + function_call?: FunctionCall.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.js b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.js new file mode 100644 index 0000000000..9687a24857 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.js @@ -0,0 +1,59 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionRequest = void 0; +const core = __importStar(require("../../../../../core")); +const Message_1 = require("../../../../types/Message"); +const StreamOptions_1 = require("../../../../types/StreamOptions"); +const ResponseFormat_1 = require("../../../../types/ResponseFormat"); +const Tool_1 = require("../../../../types/Tool"); +const Function_1 = require("../../../../types/Function"); +const FunctionCall_1 = require("../../../../types/FunctionCall"); +exports.ChatCompletionRequest = core.serialization.object({ + model: core.serialization.string().optional(), + messages: core.serialization.list(Message_1.Message).optional(), + temperature: core.serialization.number().optional(), + topP: core.serialization.property("top_p", core.serialization.number().optional()), + n: core.serialization.number().optional(), + stream: core.serialization.boolean().optional(), + streamOptions: core.serialization.property("stream_options", StreamOptions_1.StreamOptions.optional()), + stop: core.serialization.list(core.serialization.string()).optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + maxCompletionTokens: core.serialization.property("max_completion_tokens", core.serialization.number().optional()), + presencePenalty: core.serialization.property("presence_penalty", core.serialization.number().optional()), + frequencyPenalty: core.serialization.property("frequency_penalty", core.serialization.number().optional()), + logitBias: core.serialization.property("logit_bias", core.serialization.record(core.serialization.string(), core.serialization.number()).optional()), + user: core.serialization.string().optional(), + responseFormat: core.serialization.property("response_format", ResponseFormat_1.ResponseFormat.optional()), + seed: core.serialization.number().optional(), + tools: core.serialization.list(Tool_1.Tool).optional(), + toolChoice: core.serialization.property("tool_choice", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()), + parallelToolCalls: core.serialization.property("parallel_tool_calls", core.serialization.boolean().optional()), + functions: core.serialization.list(Function_1.Function).optional(), + functionCall: core.serialization.property("function_call", FunctionCall_1.FunctionCall.optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.d.ts new file mode 100644 index 0000000000..f91a056dff --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.d.ts @@ -0,0 +1 @@ +export { ChatCompletionRequest } from "./ChatCompletionRequest"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.js new file mode 100644 index 0000000000..f080e7cf17 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionRequest = void 0; +var ChatCompletionRequest_1 = require("./ChatCompletionRequest"); +Object.defineProperty(exports, "ChatCompletionRequest", { enumerable: true, get: function () { return ChatCompletionRequest_1.ChatCompletionRequest; } }); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/index.d.ts new file mode 100644 index 0000000000..5ec76921e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/index.d.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/index.js new file mode 100644 index 0000000000..352398aff9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/chatCompletions/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./client"), exports); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/index.d.ts index 5b4bd39034..5af908e5db 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/index.d.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/index.d.ts @@ -6,9 +6,13 @@ export * as spans from "./spans"; export * from "./spans/types"; export * as experiments from "./experiments"; export * as traces from "./traces"; +export * as chatCompletions from "./chatCompletions"; +export * from "./chatCompletions/client/requests"; export * as datasets from "./datasets"; export * from "./datasets/client/requests"; export * from "./experiments/client/requests"; +export * as llmProviderKey from "./llmProviderKey"; +export * from "./llmProviderKey/client/requests"; export * from "./projects/client/requests"; export * as prompts from "./prompts"; export * from "./prompts/client/requests"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/index.js index 2bda74f97d..817ef24c4e 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/index.js +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/index.js @@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.prompts = exports.datasets = exports.traces = exports.experiments = exports.spans = exports.projects = exports.feedbackDefinitions = void 0; +exports.prompts = exports.llmProviderKey = exports.datasets = exports.chatCompletions = exports.traces = exports.experiments = exports.spans = exports.projects = exports.feedbackDefinitions = void 0; exports.feedbackDefinitions = __importStar(require("./feedbackDefinitions")); __exportStar(require("./feedbackDefinitions/types"), exports); exports.projects = __importStar(require("./projects")); @@ -35,9 +35,13 @@ exports.spans = __importStar(require("./spans")); __exportStar(require("./spans/types"), exports); exports.experiments = __importStar(require("./experiments")); exports.traces = __importStar(require("./traces")); +exports.chatCompletions = __importStar(require("./chatCompletions")); +__exportStar(require("./chatCompletions/client/requests"), exports); exports.datasets = __importStar(require("./datasets")); __exportStar(require("./datasets/client/requests"), exports); __exportStar(require("./experiments/client/requests"), exports); +exports.llmProviderKey = __importStar(require("./llmProviderKey")); +__exportStar(require("./llmProviderKey/client/requests"), exports); __exportStar(require("./projects/client/requests"), exports); exports.prompts = __importStar(require("./prompts")); __exportStar(require("./prompts/client/requests"), exports); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.d.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.d.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.js new file mode 100644 index 0000000000..6df4ebb9ef --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./requests"), exports); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.d.ts new file mode 100644 index 0000000000..8e9211b95f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../../../../index"; +import * as OpikApi from "../../../../../api/index"; +import * as core from "../../../../../core"; +export declare const ProviderApiKeyUpdate: core.serialization.Schema; +export declare namespace ProviderApiKeyUpdate { + interface Raw { + api_key: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.js b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.js new file mode 100644 index 0000000000..a8dc3a0f23 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.js @@ -0,0 +1,33 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProviderApiKeyUpdate = void 0; +const core = __importStar(require("../../../../../core")); +exports.ProviderApiKeyUpdate = core.serialization.object({ + apiKey: core.serialization.property("api_key", core.serialization.string()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.d.ts new file mode 100644 index 0000000000..189d319d51 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.d.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../../../../index"; +import * as OpikApi from "../../../../../api/index"; +import * as core from "../../../../../core"; +export declare const ProviderApiKeyWrite: core.serialization.Schema; +export declare namespace ProviderApiKeyWrite { + interface Raw { + provider?: "openai" | null; + api_key: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.js b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.js new file mode 100644 index 0000000000..200190c9bb --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.js @@ -0,0 +1,34 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProviderApiKeyWrite = void 0; +const core = __importStar(require("../../../../../core")); +exports.ProviderApiKeyWrite = core.serialization.object({ + provider: core.serialization.stringLiteral("openai").optional(), + apiKey: core.serialization.property("api_key", core.serialization.string()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.d.ts new file mode 100644 index 0000000000..fe242027f8 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.d.ts @@ -0,0 +1,2 @@ +export { ProviderApiKeyUpdate } from "./ProviderApiKeyUpdate"; +export { ProviderApiKeyWrite } from "./ProviderApiKeyWrite"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.js new file mode 100644 index 0000000000..6595de167d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProviderApiKeyWrite = exports.ProviderApiKeyUpdate = void 0; +var ProviderApiKeyUpdate_1 = require("./ProviderApiKeyUpdate"); +Object.defineProperty(exports, "ProviderApiKeyUpdate", { enumerable: true, get: function () { return ProviderApiKeyUpdate_1.ProviderApiKeyUpdate; } }); +var ProviderApiKeyWrite_1 = require("./ProviderApiKeyWrite"); +Object.defineProperty(exports, "ProviderApiKeyWrite", { enumerable: true, get: function () { return ProviderApiKeyWrite_1.ProviderApiKeyWrite; } }); diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.d.ts new file mode 100644 index 0000000000..5ec76921e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.d.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.js b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.js new file mode 100644 index 0000000000..352398aff9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./client"), exports); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessage.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessage.d.ts new file mode 100644 index 0000000000..bfe94cfd9f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessage.d.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { AssistantMessageRole } from "./AssistantMessageRole"; +import { ToolCall } from "./ToolCall"; +import { FunctionCall } from "./FunctionCall"; +export declare const AssistantMessage: core.serialization.ObjectSchema; +export declare namespace AssistantMessage { + interface Raw { + role?: AssistantMessageRole.Raw | null; + content?: string | null; + name?: string | null; + tool_calls?: ToolCall.Raw[] | null; + refusal?: boolean | null; + function_call?: FunctionCall.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessage.js b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessage.js new file mode 100644 index 0000000000..5fc333b54a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessage.js @@ -0,0 +1,41 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AssistantMessage = void 0; +const core = __importStar(require("../../core")); +const AssistantMessageRole_1 = require("./AssistantMessageRole"); +const ToolCall_1 = require("./ToolCall"); +const FunctionCall_1 = require("./FunctionCall"); +exports.AssistantMessage = core.serialization.object({ + role: AssistantMessageRole_1.AssistantMessageRole.optional(), + content: core.serialization.string().optional(), + name: core.serialization.string().optional(), + toolCalls: core.serialization.property("tool_calls", core.serialization.list(ToolCall_1.ToolCall).optional()), + refusal: core.serialization.boolean().optional(), + functionCall: core.serialization.property("function_call", FunctionCall_1.FunctionCall.optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessageRole.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessageRole.d.ts new file mode 100644 index 0000000000..e5e28bbffa --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessageRole.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const AssistantMessageRole: core.serialization.Schema; +export declare namespace AssistantMessageRole { + type Raw = "system" | "user" | "assistant" | "tool" | "function"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessageRole.js b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessageRole.js new file mode 100644 index 0000000000..212a27594c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AssistantMessageRole.js @@ -0,0 +1,31 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AssistantMessageRole = void 0; +const core = __importStar(require("../../core")); +exports.AssistantMessageRole = core.serialization.enum_(["system", "user", "assistant", "tool", "function"]); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionChoice.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionChoice.d.ts new file mode 100644 index 0000000000..a0ced79ee5 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionChoice.d.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { AssistantMessage } from "./AssistantMessage"; +import { Delta } from "./Delta"; +export declare const ChatCompletionChoice: core.serialization.ObjectSchema; +export declare namespace ChatCompletionChoice { + interface Raw { + index?: number | null; + message?: AssistantMessage.Raw | null; + delta?: Delta.Raw | null; + finish_reason?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionChoice.js b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionChoice.js new file mode 100644 index 0000000000..c268d63e9c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionChoice.js @@ -0,0 +1,38 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionChoice = void 0; +const core = __importStar(require("../../core")); +const AssistantMessage_1 = require("./AssistantMessage"); +const Delta_1 = require("./Delta"); +exports.ChatCompletionChoice = core.serialization.object({ + index: core.serialization.number().optional(), + message: AssistantMessage_1.AssistantMessage.optional(), + delta: Delta_1.Delta.optional(), + finishReason: core.serialization.property("finish_reason", core.serialization.string().optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionResponse.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionResponse.d.ts new file mode 100644 index 0000000000..7febc34a4f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionResponse.d.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { ChatCompletionChoice } from "./ChatCompletionChoice"; +import { Usage } from "./Usage"; +export declare const ChatCompletionResponse: core.serialization.ObjectSchema; +export declare namespace ChatCompletionResponse { + interface Raw { + id?: string | null; + created?: number | null; + model?: string | null; + choices?: ChatCompletionChoice.Raw[] | null; + usage?: Usage.Raw | null; + system_fingerprint?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionResponse.js b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionResponse.js new file mode 100644 index 0000000000..0d07575979 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ChatCompletionResponse.js @@ -0,0 +1,40 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChatCompletionResponse = void 0; +const core = __importStar(require("../../core")); +const ChatCompletionChoice_1 = require("./ChatCompletionChoice"); +const Usage_1 = require("./Usage"); +exports.ChatCompletionResponse = core.serialization.object({ + id: core.serialization.string().optional(), + created: core.serialization.number().optional(), + model: core.serialization.string().optional(), + choices: core.serialization.list(ChatCompletionChoice_1.ChatCompletionChoice).optional(), + usage: Usage_1.Usage.optional(), + systemFingerprint: core.serialization.property("system_fingerprint", core.serialization.string().optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Column.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Column.d.ts new file mode 100644 index 0000000000..8b23ce39d3 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Column.d.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { ColumnTypesItem } from "./ColumnTypesItem"; +export declare const Column: core.serialization.ObjectSchema; +export declare namespace Column { + interface Raw { + name?: string | null; + types?: ColumnTypesItem.Raw[] | null; + filter_field_prefix?: string | null; + filterField?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Column.js b/sdks/typescript/src/opik/rest_api/serialization/types/Column.js new file mode 100644 index 0000000000..7d5faed8d5 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Column.js @@ -0,0 +1,37 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Column = void 0; +const core = __importStar(require("../../core")); +const ColumnTypesItem_1 = require("./ColumnTypesItem"); +exports.Column = core.serialization.object({ + name: core.serialization.string().optional(), + types: core.serialization.list(ColumnTypesItem_1.ColumnTypesItem).optional(), + filterFieldPrefix: core.serialization.property("filter_field_prefix", core.serialization.string().optional()), + filterField: core.serialization.string().optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.d.ts index ed99df3cb9..8b3b8f3df1 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.d.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.d.ts @@ -10,5 +10,7 @@ export declare namespace ColumnCompare { interface Raw { name?: string | null; types?: ColumnCompareTypesItem.Raw[] | null; + filter_field_prefix?: string | null; + filterField?: string | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.js b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.js index b0b8f30b9d..0018819239 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.js +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnCompare.js @@ -32,4 +32,6 @@ const ColumnCompareTypesItem_1 = require("./ColumnCompareTypesItem"); exports.ColumnCompare = core.serialization.object({ name: core.serialization.string().optional(), types: core.serialization.list(ColumnCompareTypesItem_1.ColumnCompareTypesItem).optional(), + filterFieldPrefix: core.serialization.property("filter_field_prefix", core.serialization.string().optional()), + filterField: core.serialization.string().optional(), }); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.d.ts index e0a88b5391..a1ec9989ce 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.d.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.d.ts @@ -10,5 +10,7 @@ export declare namespace ColumnPublic { interface Raw { name?: string | null; types?: ColumnPublicTypesItem.Raw[] | null; + filter_field_prefix?: string | null; + filterField?: string | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.js b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.js index 9af0b5a442..42baabccab 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.js +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnPublic.js @@ -32,4 +32,6 @@ const ColumnPublicTypesItem_1 = require("./ColumnPublicTypesItem"); exports.ColumnPublic = core.serialization.object({ name: core.serialization.string().optional(), types: core.serialization.list(ColumnPublicTypesItem_1.ColumnPublicTypesItem).optional(), + filterFieldPrefix: core.serialization.property("filter_field_prefix", core.serialization.string().optional()), + filterField: core.serialization.string().optional(), }); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnTypesItem.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnTypesItem.d.ts new file mode 100644 index 0000000000..98bd791a32 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnTypesItem.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const ColumnTypesItem: core.serialization.Schema; +export declare namespace ColumnTypesItem { + type Raw = "string" | "number" | "object" | "boolean" | "array" | "null"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ColumnTypesItem.js b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnTypesItem.js new file mode 100644 index 0000000000..881880315b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ColumnTypesItem.js @@ -0,0 +1,31 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColumnTypesItem = void 0; +const core = __importStar(require("../../core")); +exports.ColumnTypesItem = core.serialization.enum_(["string", "number", "object", "boolean", "array", "null"]); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/CompletionTokensDetails.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/CompletionTokensDetails.d.ts new file mode 100644 index 0000000000..fc258776c6 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/CompletionTokensDetails.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const CompletionTokensDetails: core.serialization.ObjectSchema; +export declare namespace CompletionTokensDetails { + interface Raw { + reasoning_tokens?: number | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/CompletionTokensDetails.js b/sdks/typescript/src/opik/rest_api/serialization/types/CompletionTokensDetails.js new file mode 100644 index 0000000000..04a21d9e5b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/CompletionTokensDetails.js @@ -0,0 +1,33 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CompletionTokensDetails = void 0; +const core = __importStar(require("../../core")); +exports.CompletionTokensDetails = core.serialization.object({ + reasoningTokens: core.serialization.property("reasoning_tokens", core.serialization.number().optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Delta.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Delta.d.ts new file mode 100644 index 0000000000..ba833c6c2d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Delta.d.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { DeltaRole } from "./DeltaRole"; +import { ToolCall } from "./ToolCall"; +import { FunctionCall } from "./FunctionCall"; +export declare const Delta: core.serialization.ObjectSchema; +export declare namespace Delta { + interface Raw { + role?: DeltaRole.Raw | null; + content?: string | null; + tool_calls?: ToolCall.Raw[] | null; + function_call?: FunctionCall.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Delta.js b/sdks/typescript/src/opik/rest_api/serialization/types/Delta.js new file mode 100644 index 0000000000..9fc48480d8 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Delta.js @@ -0,0 +1,39 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Delta = void 0; +const core = __importStar(require("../../core")); +const DeltaRole_1 = require("./DeltaRole"); +const ToolCall_1 = require("./ToolCall"); +const FunctionCall_1 = require("./FunctionCall"); +exports.Delta = core.serialization.object({ + role: DeltaRole_1.DeltaRole.optional(), + content: core.serialization.string().optional(), + toolCalls: core.serialization.property("tool_calls", core.serialization.list(ToolCall_1.ToolCall).optional()), + functionCall: core.serialization.property("function_call", FunctionCall_1.FunctionCall.optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/DeltaRole.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/DeltaRole.d.ts new file mode 100644 index 0000000000..85a3bcefa5 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/DeltaRole.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const DeltaRole: core.serialization.Schema; +export declare namespace DeltaRole { + type Raw = "system" | "user" | "assistant" | "tool" | "function"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/DeltaRole.js b/sdks/typescript/src/opik/rest_api/serialization/types/DeltaRole.js new file mode 100644 index 0000000000..7909529331 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/DeltaRole.js @@ -0,0 +1,31 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DeltaRole = void 0; +const core = __importStar(require("../../core")); +exports.DeltaRole = core.serialization.enum_(["system", "user", "assistant", "tool", "function"]); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Function.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Function.d.ts new file mode 100644 index 0000000000..d1966e4d9c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Function.d.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { JsonObjectSchema } from "./JsonObjectSchema"; +export declare const Function: core.serialization.ObjectSchema; +export declare namespace Function { + interface Raw { + name?: string | null; + description?: string | null; + strict?: boolean | null; + parameters?: JsonObjectSchema.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Function.js b/sdks/typescript/src/opik/rest_api/serialization/types/Function.js new file mode 100644 index 0000000000..9064c3fc32 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Function.js @@ -0,0 +1,37 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Function = void 0; +const core = __importStar(require("../../core")); +const JsonObjectSchema_1 = require("./JsonObjectSchema"); +exports.Function = core.serialization.object({ + name: core.serialization.string().optional(), + description: core.serialization.string().optional(), + strict: core.serialization.boolean().optional(), + parameters: JsonObjectSchema_1.JsonObjectSchema.optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/FunctionCall.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/FunctionCall.d.ts new file mode 100644 index 0000000000..2e2885de0f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/FunctionCall.d.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const FunctionCall: core.serialization.ObjectSchema; +export declare namespace FunctionCall { + interface Raw { + name?: string | null; + arguments?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/FunctionCall.js b/sdks/typescript/src/opik/rest_api/serialization/types/FunctionCall.js new file mode 100644 index 0000000000..3735f98d6e --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/FunctionCall.js @@ -0,0 +1,34 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionCall = void 0; +const core = __importStar(require("../../core")); +exports.FunctionCall = core.serialization.object({ + name: core.serialization.string().optional(), + arguments: core.serialization.string().optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/JsonObjectSchema.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/JsonObjectSchema.d.ts new file mode 100644 index 0000000000..5c6c52ab81 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/JsonObjectSchema.d.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { JsonSchemaElement } from "./JsonSchemaElement"; +export declare const JsonObjectSchema: core.serialization.ObjectSchema; +export declare namespace JsonObjectSchema { + interface Raw { + type?: string | null; + description?: string | null; + properties?: Record | null; + required?: string[] | null; + additionalProperties?: boolean | null; + $defs?: Record | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/JsonObjectSchema.js b/sdks/typescript/src/opik/rest_api/serialization/types/JsonObjectSchema.js new file mode 100644 index 0000000000..c8e40dca3a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/JsonObjectSchema.js @@ -0,0 +1,39 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JsonObjectSchema = void 0; +const core = __importStar(require("../../core")); +const JsonSchemaElement_1 = require("./JsonSchemaElement"); +exports.JsonObjectSchema = core.serialization.object({ + type: core.serialization.string().optional(), + description: core.serialization.string().optional(), + properties: core.serialization.record(core.serialization.string(), JsonSchemaElement_1.JsonSchemaElement).optional(), + required: core.serialization.list(core.serialization.string()).optional(), + additionalProperties: core.serialization.boolean().optional(), + defs: core.serialization.property("$defs", core.serialization.record(core.serialization.string(), JsonSchemaElement_1.JsonSchemaElement).optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchema.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchema.d.ts new file mode 100644 index 0000000000..0a41c7adfa --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchema.d.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { JsonObjectSchema } from "./JsonObjectSchema"; +export declare const JsonSchema: core.serialization.ObjectSchema; +export declare namespace JsonSchema { + interface Raw { + name?: string | null; + strict?: boolean | null; + schema?: JsonObjectSchema.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchema.js b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchema.js new file mode 100644 index 0000000000..32526836e6 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchema.js @@ -0,0 +1,36 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JsonSchema = void 0; +const core = __importStar(require("../../core")); +const JsonObjectSchema_1 = require("./JsonObjectSchema"); +exports.JsonSchema = core.serialization.object({ + name: core.serialization.string().optional(), + strict: core.serialization.boolean().optional(), + schema: JsonObjectSchema_1.JsonObjectSchema.optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchemaElement.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchemaElement.d.ts new file mode 100644 index 0000000000..be64ce03f3 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchemaElement.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const JsonSchemaElement: core.serialization.ObjectSchema; +export declare namespace JsonSchemaElement { + interface Raw { + type?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchemaElement.js b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchemaElement.js new file mode 100644 index 0000000000..f29953dd2a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/JsonSchemaElement.js @@ -0,0 +1,33 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JsonSchemaElement = void 0; +const core = __importStar(require("../../core")); +exports.JsonSchemaElement = core.serialization.object({ + type: core.serialization.string().optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Message.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Message.d.ts new file mode 100644 index 0000000000..6f6a43b328 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Message.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const Message: core.serialization.Schema; +export declare namespace Message { + type Raw = Record; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Message.js b/sdks/typescript/src/opik/rest_api/serialization/types/Message.js new file mode 100644 index 0000000000..4c26ca92aa --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Message.js @@ -0,0 +1,31 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = void 0; +const core = __importStar(require("../../core")); +exports.Message = core.serialization.record(core.serialization.string(), core.serialization.unknown()); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/NotImplementedErrorBodyItem.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/NotImplementedErrorBodyItem.d.ts new file mode 100644 index 0000000000..3650a329df --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/NotImplementedErrorBodyItem.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { ChatCompletionResponse } from "./ChatCompletionResponse"; +import { ErrorMessage } from "./ErrorMessage"; +export declare const NotImplementedErrorBodyItem: core.serialization.Schema; +export declare namespace NotImplementedErrorBodyItem { + type Raw = ChatCompletionResponse.Raw | ErrorMessage.Raw; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/NotImplementedErrorBodyItem.js b/sdks/typescript/src/opik/rest_api/serialization/types/NotImplementedErrorBodyItem.js new file mode 100644 index 0000000000..cc8fe1b9c8 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/NotImplementedErrorBodyItem.js @@ -0,0 +1,33 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NotImplementedErrorBodyItem = void 0; +const core = __importStar(require("../../core")); +const ChatCompletionResponse_1 = require("./ChatCompletionResponse"); +const ErrorMessage_1 = require("./ErrorMessage"); +exports.NotImplementedErrorBodyItem = core.serialization.undiscriminatedUnion([ChatCompletionResponse_1.ChatCompletionResponse, ErrorMessage_1.ErrorMessage]); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/PageColumns.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/PageColumns.d.ts new file mode 100644 index 0000000000..55ec063bef --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/PageColumns.d.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { Column } from "./Column"; +export declare const PageColumns: core.serialization.ObjectSchema; +export declare namespace PageColumns { + interface Raw { + columns?: Column.Raw[] | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/PageColumns.js b/sdks/typescript/src/opik/rest_api/serialization/types/PageColumns.js new file mode 100644 index 0000000000..728f85ff3d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/PageColumns.js @@ -0,0 +1,34 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PageColumns = void 0; +const core = __importStar(require("../../core")); +const Column_1 = require("./Column"); +exports.PageColumns = core.serialization.object({ + columns: core.serialization.list(Column_1.Column).optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.d.ts new file mode 100644 index 0000000000..0b2118c337 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.d.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const ProviderApiKey: core.serialization.ObjectSchema; +export declare namespace ProviderApiKey { + interface Raw { + id?: string | null; + provider?: "openai" | null; + api_key: string; + created_at?: string | null; + created_by?: string | null; + last_updated_at?: string | null; + last_updated_by?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.js b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.js new file mode 100644 index 0000000000..2e2a5316b5 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.js @@ -0,0 +1,39 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProviderApiKey = void 0; +const core = __importStar(require("../../core")); +exports.ProviderApiKey = core.serialization.object({ + id: core.serialization.string().optional(), + provider: core.serialization.stringLiteral("openai").optional(), + apiKey: core.serialization.property("api_key", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + createdBy: core.serialization.property("created_by", core.serialization.string().optional()), + lastUpdatedAt: core.serialization.property("last_updated_at", core.serialization.date().optional()), + lastUpdatedBy: core.serialization.property("last_updated_by", core.serialization.string().optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.d.ts new file mode 100644 index 0000000000..d476f8bde9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.d.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const ProviderApiKeyPublic: core.serialization.ObjectSchema; +export declare namespace ProviderApiKeyPublic { + interface Raw { + id?: string | null; + provider?: "openai" | null; + created_at?: string | null; + created_by?: string | null; + last_updated_at?: string | null; + last_updated_by?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.js b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.js new file mode 100644 index 0000000000..f03d59f19e --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.js @@ -0,0 +1,38 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProviderApiKeyPublic = void 0; +const core = __importStar(require("../../core")); +exports.ProviderApiKeyPublic = core.serialization.object({ + id: core.serialization.string().optional(), + provider: core.serialization.stringLiteral("openai").optional(), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + createdBy: core.serialization.property("created_by", core.serialization.string().optional()), + lastUpdatedAt: core.serialization.property("last_updated_at", core.serialization.date().optional()), + lastUpdatedBy: core.serialization.property("last_updated_by", core.serialization.string().optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormat.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormat.d.ts new file mode 100644 index 0000000000..3a9831cd4d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormat.d.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { ResponseFormatType } from "./ResponseFormatType"; +import { JsonSchema } from "./JsonSchema"; +export declare const ResponseFormat: core.serialization.ObjectSchema; +export declare namespace ResponseFormat { + interface Raw { + type?: ResponseFormatType.Raw | null; + json_schema?: JsonSchema.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormat.js b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormat.js new file mode 100644 index 0000000000..8a541ef9c2 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormat.js @@ -0,0 +1,36 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResponseFormat = void 0; +const core = __importStar(require("../../core")); +const ResponseFormatType_1 = require("./ResponseFormatType"); +const JsonSchema_1 = require("./JsonSchema"); +exports.ResponseFormat = core.serialization.object({ + type: ResponseFormatType_1.ResponseFormatType.optional(), + jsonSchema: core.serialization.property("json_schema", JsonSchema_1.JsonSchema.optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormatType.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormatType.d.ts new file mode 100644 index 0000000000..192091c425 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormatType.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const ResponseFormatType: core.serialization.Schema; +export declare namespace ResponseFormatType { + type Raw = "text" | "json_object" | "json_schema"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormatType.js b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormatType.js new file mode 100644 index 0000000000..1991b21df7 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ResponseFormatType.js @@ -0,0 +1,31 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResponseFormatType = void 0; +const core = __importStar(require("../../core")); +exports.ResponseFormatType = core.serialization.enum_(["text", "json_object", "json_schema"]); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/StreamOptions.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/StreamOptions.d.ts new file mode 100644 index 0000000000..f0cd6b3b2f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/StreamOptions.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +export declare const StreamOptions: core.serialization.ObjectSchema; +export declare namespace StreamOptions { + interface Raw { + include_usage?: boolean | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/StreamOptions.js b/sdks/typescript/src/opik/rest_api/serialization/types/StreamOptions.js new file mode 100644 index 0000000000..e9028e26c1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/StreamOptions.js @@ -0,0 +1,33 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StreamOptions = void 0; +const core = __importStar(require("../../core")); +exports.StreamOptions = core.serialization.object({ + includeUsage: core.serialization.property("include_usage", core.serialization.boolean().optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Tool.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Tool.d.ts new file mode 100644 index 0000000000..313af2e3d0 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Tool.d.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { Function } from "./Function"; +export declare const Tool: core.serialization.ObjectSchema; +export declare namespace Tool { + interface Raw { + type?: "function" | null; + function?: Function.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Tool.js b/sdks/typescript/src/opik/rest_api/serialization/types/Tool.js new file mode 100644 index 0000000000..f39366a31a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Tool.js @@ -0,0 +1,35 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Tool = void 0; +const core = __importStar(require("../../core")); +const Function_1 = require("./Function"); +exports.Tool = core.serialization.object({ + type: core.serialization.stringLiteral("function").optional(), + function: Function_1.Function.optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ToolCall.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ToolCall.d.ts new file mode 100644 index 0000000000..e85d913a0a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ToolCall.d.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { FunctionCall } from "./FunctionCall"; +export declare const ToolCall: core.serialization.ObjectSchema; +export declare namespace ToolCall { + interface Raw { + id?: string | null; + index?: number | null; + type?: "function" | null; + function?: FunctionCall.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ToolCall.js b/sdks/typescript/src/opik/rest_api/serialization/types/ToolCall.js new file mode 100644 index 0000000000..d7055f952e --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ToolCall.js @@ -0,0 +1,37 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ToolCall = void 0; +const core = __importStar(require("../../core")); +const FunctionCall_1 = require("./FunctionCall"); +exports.ToolCall = core.serialization.object({ + id: core.serialization.string().optional(), + index: core.serialization.number().optional(), + type: core.serialization.stringLiteral("function").optional(), + function: FunctionCall_1.FunctionCall.optional(), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Usage.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Usage.d.ts new file mode 100644 index 0000000000..d65d4ca734 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Usage.d.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import * as core from "../../core"; +import { CompletionTokensDetails } from "./CompletionTokensDetails"; +export declare const Usage: core.serialization.ObjectSchema; +export declare namespace Usage { + interface Raw { + total_tokens?: number | null; + prompt_tokens?: number | null; + completion_tokens?: number | null; + completion_tokens_details?: CompletionTokensDetails.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Usage.js b/sdks/typescript/src/opik/rest_api/serialization/types/Usage.js new file mode 100644 index 0000000000..24c1d817a9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Usage.js @@ -0,0 +1,37 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Usage = void 0; +const core = __importStar(require("../../core")); +const CompletionTokensDetails_1 = require("./CompletionTokensDetails"); +exports.Usage = core.serialization.object({ + totalTokens: core.serialization.property("total_tokens", core.serialization.number().optional()), + promptTokens: core.serialization.property("prompt_tokens", core.serialization.number().optional()), + completionTokens: core.serialization.property("completion_tokens", core.serialization.number().optional()), + completionTokensDetails: core.serialization.property("completion_tokens_details", CompletionTokensDetails_1.CompletionTokensDetails.optional()), +}); diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/index.d.ts b/sdks/typescript/src/opik/rest_api/serialization/types/index.d.ts index 663ead306f..db484b3b73 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/index.d.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/index.d.ts @@ -1,9 +1,29 @@ +export * from "./NotImplementedErrorBodyItem"; export * from "./BiInformation"; export * from "./BiInformationResponse"; export * from "./TraceCountResponse"; export * from "./WorkspaceTraceCount"; export * from "./ErrorMessage"; export * from "./AuthDetailsHolder"; +export * from "./AssistantMessageRole"; +export * from "./AssistantMessage"; +export * from "./ChatCompletionChoice"; +export * from "./ChatCompletionResponse"; +export * from "./CompletionTokensDetails"; +export * from "./DeltaRole"; +export * from "./Delta"; +export * from "./FunctionCall"; +export * from "./ToolCall"; +export * from "./Usage"; +export * from "./Function"; +export * from "./JsonObjectSchema"; +export * from "./JsonSchema"; +export * from "./JsonSchemaElement"; +export * from "./Message"; +export * from "./ResponseFormatType"; +export * from "./ResponseFormat"; +export * from "./StreamOptions"; +export * from "./Tool"; export * from "./Dataset"; export * from "./DatasetItemSource"; export * from "./DatasetItem"; @@ -34,6 +54,9 @@ export * from "./JsonNodePublic"; export * from "./ColumnPublicTypesItem"; export * from "./ColumnPublic"; export * from "./DatasetItemPagePublic"; +export * from "./ColumnTypesItem"; +export * from "./Column"; +export * from "./PageColumns"; export * from "./ChunkedOutputJsonNodeType"; export * from "./ChunkedOutputJsonNode"; export * from "./Experiment"; @@ -67,6 +90,8 @@ export * from "./CategoricalFeedbackDetailUpdate"; export * from "./FeedbackUpdate"; export * from "./NumericalFeedbackDefinitionUpdate"; export * from "./NumericalFeedbackDetailUpdate"; +export * from "./ProviderApiKeyPublic"; +export * from "./ProviderApiKey"; export * from "./Project"; export * from "./ProjectPagePublic"; export * from "./ProjectPublic"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/index.js b/sdks/typescript/src/opik/rest_api/serialization/types/index.js index 0ff43b3bf1..9f87a98a0d 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/index.js +++ b/sdks/typescript/src/opik/rest_api/serialization/types/index.js @@ -14,12 +14,32 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./NotImplementedErrorBodyItem"), exports); __exportStar(require("./BiInformation"), exports); __exportStar(require("./BiInformationResponse"), exports); __exportStar(require("./TraceCountResponse"), exports); __exportStar(require("./WorkspaceTraceCount"), exports); __exportStar(require("./ErrorMessage"), exports); __exportStar(require("./AuthDetailsHolder"), exports); +__exportStar(require("./AssistantMessageRole"), exports); +__exportStar(require("./AssistantMessage"), exports); +__exportStar(require("./ChatCompletionChoice"), exports); +__exportStar(require("./ChatCompletionResponse"), exports); +__exportStar(require("./CompletionTokensDetails"), exports); +__exportStar(require("./DeltaRole"), exports); +__exportStar(require("./Delta"), exports); +__exportStar(require("./FunctionCall"), exports); +__exportStar(require("./ToolCall"), exports); +__exportStar(require("./Usage"), exports); +__exportStar(require("./Function"), exports); +__exportStar(require("./JsonObjectSchema"), exports); +__exportStar(require("./JsonSchema"), exports); +__exportStar(require("./JsonSchemaElement"), exports); +__exportStar(require("./Message"), exports); +__exportStar(require("./ResponseFormatType"), exports); +__exportStar(require("./ResponseFormat"), exports); +__exportStar(require("./StreamOptions"), exports); +__exportStar(require("./Tool"), exports); __exportStar(require("./Dataset"), exports); __exportStar(require("./DatasetItemSource"), exports); __exportStar(require("./DatasetItem"), exports); @@ -50,6 +70,9 @@ __exportStar(require("./JsonNodePublic"), exports); __exportStar(require("./ColumnPublicTypesItem"), exports); __exportStar(require("./ColumnPublic"), exports); __exportStar(require("./DatasetItemPagePublic"), exports); +__exportStar(require("./ColumnTypesItem"), exports); +__exportStar(require("./Column"), exports); +__exportStar(require("./PageColumns"), exports); __exportStar(require("./ChunkedOutputJsonNodeType"), exports); __exportStar(require("./ChunkedOutputJsonNode"), exports); __exportStar(require("./Experiment"), exports); @@ -83,6 +106,8 @@ __exportStar(require("./CategoricalFeedbackDetailUpdate"), exports); __exportStar(require("./FeedbackUpdate"), exports); __exportStar(require("./NumericalFeedbackDefinitionUpdate"), exports); __exportStar(require("./NumericalFeedbackDetailUpdate"), exports); +__exportStar(require("./ProviderApiKeyPublic"), exports); +__exportStar(require("./ProviderApiKey"), exports); __exportStar(require("./Project"), exports); __exportStar(require("./ProjectPagePublic"), exports); __exportStar(require("./ProjectPublic"), exports);