diff --git a/apps/opik-documentation/documentation/rest_api/opik.yaml b/apps/opik-documentation/documentation/rest_api/opik.yaml index dc28affd35..a3a536036c 100644 --- a/apps/opik-documentation/documentation/rest_api/opik.yaml +++ b/apps/opik-documentation/documentation/rest_api/opik.yaml @@ -39,6 +39,8 @@ tags: description: System usage related resource - name: Check description: Access check resources +- name: Automation rule evaluators + description: Automation rule evaluators resource - name: Chat Completions description: Chat Completions related resources - name: Datasets @@ -141,6 +143,149 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' + /v1/private/automations/projects/{projectId}/evaluators: + get: + tags: + - Automation rule evaluators + summary: Find project Evaluators + description: Find project Evaluators + operationId: findEvaluators + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + - name: name + in: query + schema: + type: string + - name: page + in: query + schema: + minimum: 1 + type: integer + format: int32 + default: 1 + - name: size + in: query + schema: + minimum: 1 + type: integer + format: int32 + default: 10 + responses: + "200": + description: Evaluators resource + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluatorPage_Public' + post: + tags: + - Automation rule evaluators + summary: Create automation rule evaluator + description: Create automation rule evaluator + operationId: createAutomationRuleEvaluator + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluator_Write' + responses: + "201": + description: Created + headers: + Location: + required: true + style: simple + schema: + type: string + example: "${basePath}/v1/private/automations/projects/{projectId}/evaluators/{evaluatorId}" + /v1/private/automations/projects/{projectId}/evaluators/delete: + post: + tags: + - Automation rule evaluators + summary: Delete automation rule evaluators + description: Delete automation rule evaluators batch + operationId: deleteAutomationRuleEvaluatorBatch + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchDelete' + responses: + "204": + description: No Content + /v1/private/automations/projects/{projectId}/evaluators/{id}: + get: + tags: + - Automation rule evaluators + summary: Get automation rule evaluator by id + description: Get automation rule by id + operationId: getEvaluatorById + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + - name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Automation Rule resource + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluator_Public' + patch: + tags: + - Automation rule evaluators + summary: update Automation Rule Evaluator by id + description: update Automation Rule Evaluator by id + operationId: updateAutomationRuleEvaluator + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluatorUpdate' + responses: + "204": + description: No content /v1/private/chat/completions: post: tags: @@ -394,6 +539,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Dataset item resource @@ -473,6 +619,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Dataset items resource @@ -1191,6 +1338,25 @@ paths: responses: "204": description: No Content + /v1/private/projects/feedback-scores/names: + get: + tags: + - Projects + summary: Find Feedback Score names By Project Ids + description: Find Feedback Score names By Project Ids + operationId: findFeedbackScoreNamesByProjectIds + parameters: + - name: project_ids + in: query + schema: + type: string + responses: + "200": + description: Feedback Scores resource + content: + application/json: + schema: + $ref: '#/components/schemas/FeedbackScoreNames' /v1/private/projects/{id}/metrics: post: tags: @@ -1653,6 +1819,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Spans resource @@ -1932,6 +2099,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Trace resource @@ -2158,45 +2326,477 @@ components: properties: workspace_id: type: string - user: + user: + type: string + count: + type: integer + format: int64 + BiInformationResponse: + type: object + properties: + bi_information: + type: array + items: + $ref: '#/components/schemas/BiInformation' + TraceCountResponse: + type: object + properties: + workspaces_traces_count: + type: array + items: + $ref: '#/components/schemas/WorkspaceTraceCount' + WorkspaceTraceCount: + type: object + properties: + workspace: + type: string + trace_count: + type: integer + format: int32 + ErrorMessage: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: string + AuthDetailsHolder: + type: object + AutomationRuleEvaluator: + required: + - name + - type + type: object + properties: + id: + type: string + format: uuid + readOnly: true + projectId: + type: string + format: uuid + readOnly: true + name: + type: string + samplingRate: + type: number + format: float + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + readOnly: true + lastUpdatedAt: + type: string + format: date-time + readOnly: true + lastUpdatedBy: + type: string + readOnly: true + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge' + AutomationRuleEvaluatorLlmAsJudge: + required: + - code + - name + - type + type: object + allOf: + - $ref: '#/components/schemas/AutomationRuleEvaluator' + - type: object + properties: + code: + $ref: '#/components/schemas/LlmAsJudgeCode' + LlmAsJudgeCode: + required: + - messages + - model + - schema + - variables + type: object + properties: + model: + $ref: '#/components/schemas/LlmAsJudgeModelParameters' + messages: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeMessage' + variables: + type: object + additionalProperties: + type: string + schema: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeOutputSchema' + LlmAsJudgeMessage: + required: + - content + - role + type: object + properties: + role: + type: string + enum: + - SYSTEM + - USER + - AI + - TOOL_EXECUTION_RESULT + content: + type: string + LlmAsJudgeModelParameters: + required: + - name + - temperature + type: object + properties: + name: + type: string + temperature: + type: number + format: double + LlmAsJudgeOutputSchema: + required: + - description + - name + - type + type: object + properties: + name: + type: string + type: + type: string + enum: + - BOOLEAN + - INTEGER + - DOUBLE + description: + type: string + AutomationRuleEvaluatorLlmAsJudge_Write: + required: + - code + - name + - type + type: object + allOf: + - $ref: '#/components/schemas/AutomationRuleEvaluator_Write' + - type: object + properties: + code: + $ref: '#/components/schemas/LlmAsJudgeCode_Write' + AutomationRuleEvaluator_Write: + required: + - name + - type + type: object + properties: + name: + type: string + samplingRate: + type: number + format: float + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge_Write' + LlmAsJudgeCode_Write: + required: + - messages + - model + - schema + - variables + type: object + properties: + model: + $ref: '#/components/schemas/LlmAsJudgeModelParameters_Write' + messages: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeMessage_Write' + variables: + type: object + additionalProperties: + type: string + schema: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeOutputSchema_Write' + LlmAsJudgeMessage_Write: + required: + - content + - role + type: object + properties: + role: + type: string + enum: + - SYSTEM + - USER + - AI + - TOOL_EXECUTION_RESULT + content: + type: string + LlmAsJudgeModelParameters_Write: + required: + - name + - temperature + type: object + properties: + name: + type: string + temperature: + type: number + format: double + LlmAsJudgeOutputSchema_Write: + required: + - description + - name + - type + type: object + properties: + name: + type: string + type: + type: string + enum: + - BOOLEAN + - INTEGER + - DOUBLE + description: + type: string + BatchDelete: + required: + - ids + type: object + properties: + ids: + maxItems: 1000 + minItems: 1 + uniqueItems: true + type: array + items: + type: string + format: uuid + AutomationRuleEvaluatorLlmAsJudge_Public: + required: + - code + - name + - type + type: object + allOf: + - $ref: '#/components/schemas/AutomationRuleEvaluator_Public' + - type: object + properties: + code: + $ref: '#/components/schemas/LlmAsJudgeCode_Public' + AutomationRuleEvaluatorObject_Public: + required: + - name + - type + type: object + properties: + id: + type: string + format: uuid + readOnly: true + projectId: + type: string + format: uuid + readOnly: true + name: + type: string + samplingRate: + type: number + format: float + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + readOnly: true + lastUpdatedAt: + type: string + format: date-time + readOnly: true + lastUpdatedBy: type: string - count: - type: integer - format: int64 - BiInformationResponse: + readOnly: true + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge_Public' + AutomationRuleEvaluatorPage_Public: type: object properties: - bi_information: + page: + type: integer + format: int32 + size: + type: integer + format: int32 + total: + type: integer + format: int64 + content: type: array items: - $ref: '#/components/schemas/BiInformation' - TraceCountResponse: + $ref: '#/components/schemas/AutomationRuleEvaluatorObject_Public' + LlmAsJudgeCode_Public: + required: + - messages + - model + - schema + - variables type: object properties: - workspaces_traces_count: + model: + $ref: '#/components/schemas/LlmAsJudgeModelParameters_Public' + messages: type: array items: - $ref: '#/components/schemas/WorkspaceTraceCount' - WorkspaceTraceCount: + $ref: '#/components/schemas/LlmAsJudgeMessage_Public' + variables: + type: object + additionalProperties: + type: string + schema: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeOutputSchema_Public' + LlmAsJudgeMessage_Public: + required: + - content + - role type: object properties: - workspace: + role: type: string - trace_count: - type: integer - format: int32 - ErrorMessage: + enum: + - SYSTEM + - USER + - AI + - TOOL_EXECUTION_RESULT + content: + type: string + LlmAsJudgeModelParameters_Public: + required: + - name + - temperature type: object properties: - code: - type: integer - format: int32 - message: + name: type: string - details: + temperature: + type: number + format: double + LlmAsJudgeOutputSchema_Public: + required: + - description + - name + - type + type: object + properties: + name: type: string - AuthDetailsHolder: + type: + type: string + enum: + - BOOLEAN + - INTEGER + - DOUBLE + description: + type: string + AutomationRuleEvaluator_Public: + required: + - name + - type + type: object + properties: + id: + type: string + format: uuid + readOnly: true + projectId: + type: string + format: uuid + readOnly: true + name: + type: string + samplingRate: + type: number + format: float + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + readOnly: true + lastUpdatedAt: + type: string + format: date-time + readOnly: true + lastUpdatedBy: + type: string + readOnly: true + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge_Public' + AutomationRuleEvaluatorUpdate: + required: + - code + - name + - sampling_rate type: object + properties: + name: + type: string + code: + $ref: '#/components/schemas/LlmAsJudgeCode' + sampling_rate: + type: number + format: float AssistantMessage: type: object properties: @@ -2505,18 +3105,13 @@ components: type: string DatasetItem: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode' - expected_output: - $ref: '#/components/schemas/JsonNode' - metadata: - $ref: '#/components/schemas/JsonNode' trace_id: type: string format: uuid @@ -2674,18 +3269,13 @@ components: $ref: '#/components/schemas/DatasetItem_Write' DatasetItem_Write: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode_Write' - expected_output: - $ref: '#/components/schemas/JsonNode_Write' - metadata: - $ref: '#/components/schemas/JsonNode_Write' trace_id: type: string format: uuid @@ -2701,8 +3291,6 @@ components: - sdk data: $ref: '#/components/schemas/JsonNode' - JsonNode_Write: - type: object DatasetIdentifier: required: - dataset_name @@ -2722,19 +3310,6 @@ components: items: type: string format: uuid - BatchDelete: - required: - - ids - type: object - properties: - ids: - maxItems: 1000 - minItems: 1 - uniqueItems: true - type: array - items: - type: string - format: uuid Column_Compare: type: object properties: @@ -2781,18 +3356,13 @@ components: $ref: '#/components/schemas/Column_Compare' DatasetItem_Compare: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode_Compare' - expected_output: - $ref: '#/components/schemas/JsonNode_Compare' - metadata: - $ref: '#/components/schemas/JsonNode_Compare' trace_id: type: string format: uuid @@ -2980,18 +3550,13 @@ components: type: string DatasetItem_Public: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode_Public' - expected_output: - $ref: '#/components/schemas/JsonNode_Public' - metadata: - $ref: '#/components/schemas/JsonNode_Public' trace_id: type: string format: uuid @@ -3059,8 +3624,6 @@ components: last_updated_by: type: string readOnly: true - JsonNode_Public: - type: object Column_Public: type: object properties: @@ -3253,6 +3816,8 @@ components: $ref: '#/components/schemas/JsonNode_Write' prompt_version: $ref: '#/components/schemas/PromptVersionLink_Write' + JsonNode_Write: + type: object PromptVersionLink_Write: required: - id @@ -3369,6 +3934,8 @@ components: value: type: number readOnly: true + JsonNode_Public: + type: object PromptVersionLink_Public: required: - id @@ -3411,6 +3978,10 @@ components: last_retrieved_id: type: string format: uuid + truncate: + type: boolean + description: "Truncate image included in either input, output or metadata" + default: true CategoricalFeedbackDefinition: required: - details @@ -3833,6 +4404,7 @@ components: type: string ProviderApiKey_Public: required: + - api_key - provider type: object properties: @@ -3844,6 +4416,13 @@ components: type: string enum: - openai + - anthropic + api_key: + type: string + name: + maxLength: 150 + minLength: 0 + type: string created_at: type: string format: date-time @@ -3872,8 +4451,13 @@ components: type: string enum: - openai + - anthropic api_key: type: string + name: + maxLength: 150 + minLength: 0 + type: string created_at: type: string format: date-time @@ -3898,8 +4482,13 @@ components: type: string enum: - openai + - anthropic api_key: type: string + name: + maxLength: 150 + minLength: 0 + type: string ProviderApiKeyUpdate: required: - api_key @@ -3907,6 +4496,20 @@ components: properties: api_key: type: string + name: + maxLength: 150 + minLength: 0 + type: string + PercentageValues: + type: object + properties: + p50: + type: number + p90: + type: number + p99: + type: number + readOnly: true Project: required: - name @@ -3938,6 +4541,24 @@ components: type: string format: date-time readOnly: true + feedback_scores: + type: array + readOnly: true + items: + $ref: '#/components/schemas/FeedbackScoreAverage' + duration: + $ref: '#/components/schemas/PercentageValues' + total_estimated_cost: + type: number + format: double + readOnly: true + usage: + type: object + additionalProperties: + type: number + format: double + readOnly: true + readOnly: true Project_Write: required: - name @@ -3947,6 +4568,15 @@ components: type: string description: type: string + PercentageValues_Public: + type: object + properties: + p50: + type: number + p90: + type: number + p99: + type: number Project_Public: required: - name @@ -3978,6 +4608,36 @@ components: type: string format: date-time readOnly: true + feedback_scores: + type: array + readOnly: true + items: + $ref: '#/components/schemas/FeedbackScoreAverage_Public' + duration: + $ref: '#/components/schemas/PercentageValues_Public' + total_estimated_cost: + type: number + format: double + readOnly: true + usage: + type: object + additionalProperties: + type: number + format: double + readOnly: true + readOnly: true + FeedbackScoreNames: + type: object + properties: + scores: + type: array + items: + $ref: '#/components/schemas/ScoreName' + ScoreName: + type: object + properties: + name: + type: string DataPointNumber_Public: required: - time @@ -4457,8 +5117,11 @@ components: items: $ref: '#/components/schemas/FeedbackScore' total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false type: number - readOnly: true + total_estimated_cost_version: + type: string duration: type: number description: Duration in milliseconds as a decimal number to support sub-millisecond @@ -4534,6 +5197,12 @@ components: format: int32 error_info: $ref: '#/components/schemas/ErrorInfo_Write' + total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false + type: number + total_estimated_cost_version: + type: string SpanBatch: required: - spans @@ -4691,8 +5360,11 @@ components: items: $ref: '#/components/schemas/FeedbackScore_Public' total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false type: number - readOnly: true + total_estimated_cost_version: + type: string duration: type: number description: Duration in milliseconds as a decimal number to support sub-millisecond @@ -4741,15 +5413,6 @@ components: properties: value: $ref: '#/components/schemas/PercentageValues_Public' - PercentageValues_Public: - type: object - properties: - p50: - type: number - p90: - type: number - p99: - type: number ProjectStatItemObject_Public: type: object properties: @@ -4860,6 +5523,10 @@ components: additionalProperties: type: integer format: int32 + total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false + type: number error_info: $ref: '#/components/schemas/ErrorInfo' Trace: diff --git a/sdks/code_generation/fern/openapi/openapi.yaml b/sdks/code_generation/fern/openapi/openapi.yaml index dc28affd35..a3a536036c 100644 --- a/sdks/code_generation/fern/openapi/openapi.yaml +++ b/sdks/code_generation/fern/openapi/openapi.yaml @@ -39,6 +39,8 @@ tags: description: System usage related resource - name: Check description: Access check resources +- name: Automation rule evaluators + description: Automation rule evaluators resource - name: Chat Completions description: Chat Completions related resources - name: Datasets @@ -141,6 +143,149 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' + /v1/private/automations/projects/{projectId}/evaluators: + get: + tags: + - Automation rule evaluators + summary: Find project Evaluators + description: Find project Evaluators + operationId: findEvaluators + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + - name: name + in: query + schema: + type: string + - name: page + in: query + schema: + minimum: 1 + type: integer + format: int32 + default: 1 + - name: size + in: query + schema: + minimum: 1 + type: integer + format: int32 + default: 10 + responses: + "200": + description: Evaluators resource + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluatorPage_Public' + post: + tags: + - Automation rule evaluators + summary: Create automation rule evaluator + description: Create automation rule evaluator + operationId: createAutomationRuleEvaluator + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluator_Write' + responses: + "201": + description: Created + headers: + Location: + required: true + style: simple + schema: + type: string + example: "${basePath}/v1/private/automations/projects/{projectId}/evaluators/{evaluatorId}" + /v1/private/automations/projects/{projectId}/evaluators/delete: + post: + tags: + - Automation rule evaluators + summary: Delete automation rule evaluators + description: Delete automation rule evaluators batch + operationId: deleteAutomationRuleEvaluatorBatch + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BatchDelete' + responses: + "204": + description: No Content + /v1/private/automations/projects/{projectId}/evaluators/{id}: + get: + tags: + - Automation rule evaluators + summary: Get automation rule evaluator by id + description: Get automation rule by id + operationId: getEvaluatorById + parameters: + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + - name: id + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Automation Rule resource + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluator_Public' + patch: + tags: + - Automation rule evaluators + summary: update Automation Rule Evaluator by id + description: update Automation Rule Evaluator by id + operationId: updateAutomationRuleEvaluator + parameters: + - name: id + in: path + required: true + schema: + type: string + format: uuid + - name: projectId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AutomationRuleEvaluatorUpdate' + responses: + "204": + description: No content /v1/private/chat/completions: post: tags: @@ -394,6 +539,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Dataset item resource @@ -473,6 +619,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Dataset items resource @@ -1191,6 +1338,25 @@ paths: responses: "204": description: No Content + /v1/private/projects/feedback-scores/names: + get: + tags: + - Projects + summary: Find Feedback Score names By Project Ids + description: Find Feedback Score names By Project Ids + operationId: findFeedbackScoreNamesByProjectIds + parameters: + - name: project_ids + in: query + schema: + type: string + responses: + "200": + description: Feedback Scores resource + content: + application/json: + schema: + $ref: '#/components/schemas/FeedbackScoreNames' /v1/private/projects/{id}/metrics: post: tags: @@ -1653,6 +1819,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Spans resource @@ -1932,6 +2099,7 @@ paths: in: query schema: type: boolean + description: "Truncate image included in either input, output or metadata" responses: "200": description: Trace resource @@ -2158,45 +2326,477 @@ components: properties: workspace_id: type: string - user: + user: + type: string + count: + type: integer + format: int64 + BiInformationResponse: + type: object + properties: + bi_information: + type: array + items: + $ref: '#/components/schemas/BiInformation' + TraceCountResponse: + type: object + properties: + workspaces_traces_count: + type: array + items: + $ref: '#/components/schemas/WorkspaceTraceCount' + WorkspaceTraceCount: + type: object + properties: + workspace: + type: string + trace_count: + type: integer + format: int32 + ErrorMessage: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: string + AuthDetailsHolder: + type: object + AutomationRuleEvaluator: + required: + - name + - type + type: object + properties: + id: + type: string + format: uuid + readOnly: true + projectId: + type: string + format: uuid + readOnly: true + name: + type: string + samplingRate: + type: number + format: float + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + readOnly: true + lastUpdatedAt: + type: string + format: date-time + readOnly: true + lastUpdatedBy: + type: string + readOnly: true + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge' + AutomationRuleEvaluatorLlmAsJudge: + required: + - code + - name + - type + type: object + allOf: + - $ref: '#/components/schemas/AutomationRuleEvaluator' + - type: object + properties: + code: + $ref: '#/components/schemas/LlmAsJudgeCode' + LlmAsJudgeCode: + required: + - messages + - model + - schema + - variables + type: object + properties: + model: + $ref: '#/components/schemas/LlmAsJudgeModelParameters' + messages: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeMessage' + variables: + type: object + additionalProperties: + type: string + schema: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeOutputSchema' + LlmAsJudgeMessage: + required: + - content + - role + type: object + properties: + role: + type: string + enum: + - SYSTEM + - USER + - AI + - TOOL_EXECUTION_RESULT + content: + type: string + LlmAsJudgeModelParameters: + required: + - name + - temperature + type: object + properties: + name: + type: string + temperature: + type: number + format: double + LlmAsJudgeOutputSchema: + required: + - description + - name + - type + type: object + properties: + name: + type: string + type: + type: string + enum: + - BOOLEAN + - INTEGER + - DOUBLE + description: + type: string + AutomationRuleEvaluatorLlmAsJudge_Write: + required: + - code + - name + - type + type: object + allOf: + - $ref: '#/components/schemas/AutomationRuleEvaluator_Write' + - type: object + properties: + code: + $ref: '#/components/schemas/LlmAsJudgeCode_Write' + AutomationRuleEvaluator_Write: + required: + - name + - type + type: object + properties: + name: + type: string + samplingRate: + type: number + format: float + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge_Write' + LlmAsJudgeCode_Write: + required: + - messages + - model + - schema + - variables + type: object + properties: + model: + $ref: '#/components/schemas/LlmAsJudgeModelParameters_Write' + messages: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeMessage_Write' + variables: + type: object + additionalProperties: + type: string + schema: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeOutputSchema_Write' + LlmAsJudgeMessage_Write: + required: + - content + - role + type: object + properties: + role: + type: string + enum: + - SYSTEM + - USER + - AI + - TOOL_EXECUTION_RESULT + content: + type: string + LlmAsJudgeModelParameters_Write: + required: + - name + - temperature + type: object + properties: + name: + type: string + temperature: + type: number + format: double + LlmAsJudgeOutputSchema_Write: + required: + - description + - name + - type + type: object + properties: + name: + type: string + type: + type: string + enum: + - BOOLEAN + - INTEGER + - DOUBLE + description: + type: string + BatchDelete: + required: + - ids + type: object + properties: + ids: + maxItems: 1000 + minItems: 1 + uniqueItems: true + type: array + items: + type: string + format: uuid + AutomationRuleEvaluatorLlmAsJudge_Public: + required: + - code + - name + - type + type: object + allOf: + - $ref: '#/components/schemas/AutomationRuleEvaluator_Public' + - type: object + properties: + code: + $ref: '#/components/schemas/LlmAsJudgeCode_Public' + AutomationRuleEvaluatorObject_Public: + required: + - name + - type + type: object + properties: + id: + type: string + format: uuid + readOnly: true + projectId: + type: string + format: uuid + readOnly: true + name: + type: string + samplingRate: + type: number + format: float + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + readOnly: true + lastUpdatedAt: + type: string + format: date-time + readOnly: true + lastUpdatedBy: type: string - count: - type: integer - format: int64 - BiInformationResponse: + readOnly: true + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge_Public' + AutomationRuleEvaluatorPage_Public: type: object properties: - bi_information: + page: + type: integer + format: int32 + size: + type: integer + format: int32 + total: + type: integer + format: int64 + content: type: array items: - $ref: '#/components/schemas/BiInformation' - TraceCountResponse: + $ref: '#/components/schemas/AutomationRuleEvaluatorObject_Public' + LlmAsJudgeCode_Public: + required: + - messages + - model + - schema + - variables type: object properties: - workspaces_traces_count: + model: + $ref: '#/components/schemas/LlmAsJudgeModelParameters_Public' + messages: type: array items: - $ref: '#/components/schemas/WorkspaceTraceCount' - WorkspaceTraceCount: + $ref: '#/components/schemas/LlmAsJudgeMessage_Public' + variables: + type: object + additionalProperties: + type: string + schema: + type: array + items: + $ref: '#/components/schemas/LlmAsJudgeOutputSchema_Public' + LlmAsJudgeMessage_Public: + required: + - content + - role type: object properties: - workspace: + role: type: string - trace_count: - type: integer - format: int32 - ErrorMessage: + enum: + - SYSTEM + - USER + - AI + - TOOL_EXECUTION_RESULT + content: + type: string + LlmAsJudgeModelParameters_Public: + required: + - name + - temperature type: object properties: - code: - type: integer - format: int32 - message: + name: type: string - details: + temperature: + type: number + format: double + LlmAsJudgeOutputSchema_Public: + required: + - description + - name + - type + type: object + properties: + name: type: string - AuthDetailsHolder: + type: + type: string + enum: + - BOOLEAN + - INTEGER + - DOUBLE + description: + type: string + AutomationRuleEvaluator_Public: + required: + - name + - type + type: object + properties: + id: + type: string + format: uuid + readOnly: true + projectId: + type: string + format: uuid + readOnly: true + name: + type: string + samplingRate: + type: number + format: float + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + readOnly: true + lastUpdatedAt: + type: string + format: date-time + readOnly: true + lastUpdatedBy: + type: string + readOnly: true + type: + type: string + enum: + - llm_as_judge + action: + type: string + enum: + - evaluator + discriminator: + propertyName: type + mapping: + llm_as_judge: '#/components/schemas/AutomationRuleEvaluatorLlmAsJudge_Public' + AutomationRuleEvaluatorUpdate: + required: + - code + - name + - sampling_rate type: object + properties: + name: + type: string + code: + $ref: '#/components/schemas/LlmAsJudgeCode' + sampling_rate: + type: number + format: float AssistantMessage: type: object properties: @@ -2505,18 +3105,13 @@ components: type: string DatasetItem: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode' - expected_output: - $ref: '#/components/schemas/JsonNode' - metadata: - $ref: '#/components/schemas/JsonNode' trace_id: type: string format: uuid @@ -2674,18 +3269,13 @@ components: $ref: '#/components/schemas/DatasetItem_Write' DatasetItem_Write: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode_Write' - expected_output: - $ref: '#/components/schemas/JsonNode_Write' - metadata: - $ref: '#/components/schemas/JsonNode_Write' trace_id: type: string format: uuid @@ -2701,8 +3291,6 @@ components: - sdk data: $ref: '#/components/schemas/JsonNode' - JsonNode_Write: - type: object DatasetIdentifier: required: - dataset_name @@ -2722,19 +3310,6 @@ components: items: type: string format: uuid - BatchDelete: - required: - - ids - type: object - properties: - ids: - maxItems: 1000 - minItems: 1 - uniqueItems: true - type: array - items: - type: string - format: uuid Column_Compare: type: object properties: @@ -2781,18 +3356,13 @@ components: $ref: '#/components/schemas/Column_Compare' DatasetItem_Compare: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode_Compare' - expected_output: - $ref: '#/components/schemas/JsonNode_Compare' - metadata: - $ref: '#/components/schemas/JsonNode_Compare' trace_id: type: string format: uuid @@ -2980,18 +3550,13 @@ components: type: string DatasetItem_Public: required: + - data - source type: object properties: id: type: string format: uuid - input: - $ref: '#/components/schemas/JsonNode_Public' - expected_output: - $ref: '#/components/schemas/JsonNode_Public' - metadata: - $ref: '#/components/schemas/JsonNode_Public' trace_id: type: string format: uuid @@ -3059,8 +3624,6 @@ components: last_updated_by: type: string readOnly: true - JsonNode_Public: - type: object Column_Public: type: object properties: @@ -3253,6 +3816,8 @@ components: $ref: '#/components/schemas/JsonNode_Write' prompt_version: $ref: '#/components/schemas/PromptVersionLink_Write' + JsonNode_Write: + type: object PromptVersionLink_Write: required: - id @@ -3369,6 +3934,8 @@ components: value: type: number readOnly: true + JsonNode_Public: + type: object PromptVersionLink_Public: required: - id @@ -3411,6 +3978,10 @@ components: last_retrieved_id: type: string format: uuid + truncate: + type: boolean + description: "Truncate image included in either input, output or metadata" + default: true CategoricalFeedbackDefinition: required: - details @@ -3833,6 +4404,7 @@ components: type: string ProviderApiKey_Public: required: + - api_key - provider type: object properties: @@ -3844,6 +4416,13 @@ components: type: string enum: - openai + - anthropic + api_key: + type: string + name: + maxLength: 150 + minLength: 0 + type: string created_at: type: string format: date-time @@ -3872,8 +4451,13 @@ components: type: string enum: - openai + - anthropic api_key: type: string + name: + maxLength: 150 + minLength: 0 + type: string created_at: type: string format: date-time @@ -3898,8 +4482,13 @@ components: type: string enum: - openai + - anthropic api_key: type: string + name: + maxLength: 150 + minLength: 0 + type: string ProviderApiKeyUpdate: required: - api_key @@ -3907,6 +4496,20 @@ components: properties: api_key: type: string + name: + maxLength: 150 + minLength: 0 + type: string + PercentageValues: + type: object + properties: + p50: + type: number + p90: + type: number + p99: + type: number + readOnly: true Project: required: - name @@ -3938,6 +4541,24 @@ components: type: string format: date-time readOnly: true + feedback_scores: + type: array + readOnly: true + items: + $ref: '#/components/schemas/FeedbackScoreAverage' + duration: + $ref: '#/components/schemas/PercentageValues' + total_estimated_cost: + type: number + format: double + readOnly: true + usage: + type: object + additionalProperties: + type: number + format: double + readOnly: true + readOnly: true Project_Write: required: - name @@ -3947,6 +4568,15 @@ components: type: string description: type: string + PercentageValues_Public: + type: object + properties: + p50: + type: number + p90: + type: number + p99: + type: number Project_Public: required: - name @@ -3978,6 +4608,36 @@ components: type: string format: date-time readOnly: true + feedback_scores: + type: array + readOnly: true + items: + $ref: '#/components/schemas/FeedbackScoreAverage_Public' + duration: + $ref: '#/components/schemas/PercentageValues_Public' + total_estimated_cost: + type: number + format: double + readOnly: true + usage: + type: object + additionalProperties: + type: number + format: double + readOnly: true + readOnly: true + FeedbackScoreNames: + type: object + properties: + scores: + type: array + items: + $ref: '#/components/schemas/ScoreName' + ScoreName: + type: object + properties: + name: + type: string DataPointNumber_Public: required: - time @@ -4457,8 +5117,11 @@ components: items: $ref: '#/components/schemas/FeedbackScore' total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false type: number - readOnly: true + total_estimated_cost_version: + type: string duration: type: number description: Duration in milliseconds as a decimal number to support sub-millisecond @@ -4534,6 +5197,12 @@ components: format: int32 error_info: $ref: '#/components/schemas/ErrorInfo_Write' + total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false + type: number + total_estimated_cost_version: + type: string SpanBatch: required: - spans @@ -4691,8 +5360,11 @@ components: items: $ref: '#/components/schemas/FeedbackScore_Public' total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false type: number - readOnly: true + total_estimated_cost_version: + type: string duration: type: number description: Duration in milliseconds as a decimal number to support sub-millisecond @@ -4741,15 +5413,6 @@ components: properties: value: $ref: '#/components/schemas/PercentageValues_Public' - PercentageValues_Public: - type: object - properties: - p50: - type: number - p90: - type: number - p99: - type: number ProjectStatItemObject_Public: type: object properties: @@ -4860,6 +5523,10 @@ components: additionalProperties: type: integer format: int32 + total_estimated_cost: + minimum: 0.0 + exclusiveMinimum: false + type: number error_info: $ref: '#/components/schemas/ErrorInfo' Trace: diff --git a/sdks/python/src/opik/rest_api/__init__.py b/sdks/python/src/opik/rest_api/__init__.py index 304654ea6b..7922429543 100644 --- a/sdks/python/src/opik/rest_api/__init__.py +++ b/sdks/python/src/opik/rest_api/__init__.py @@ -4,6 +4,18 @@ AssistantMessage, AssistantMessageRole, AuthDetailsHolder, + AutomationRuleEvaluator, + AutomationRuleEvaluatorLlmAsJudge, + AutomationRuleEvaluatorLlmAsJudgePublic, + AutomationRuleEvaluatorLlmAsJudgeWrite, + AutomationRuleEvaluatorObjectPublic, + AutomationRuleEvaluatorObjectPublic_LlmAsJudge, + AutomationRuleEvaluatorPagePublic, + AutomationRuleEvaluatorPublic, + AutomationRuleEvaluatorPublic_LlmAsJudge, + AutomationRuleEvaluatorWrite, + AutomationRuleEvaluatorWrite_LlmAsJudge, + AutomationRuleEvaluator_LlmAsJudge, AvgValueStatPublic, BatchDelete, BiInformation, @@ -77,6 +89,7 @@ FeedbackScoreBatchItemSource, FeedbackScoreCompare, FeedbackScoreCompareSource, + FeedbackScoreNames, FeedbackScorePublic, FeedbackScorePublicSource, FeedbackScoreSource, @@ -95,6 +108,24 @@ JsonObjectSchema, JsonSchema, JsonSchemaElement, + LlmAsJudgeCode, + LlmAsJudgeCodePublic, + LlmAsJudgeCodeWrite, + LlmAsJudgeMessage, + LlmAsJudgeMessagePublic, + LlmAsJudgeMessagePublicRole, + LlmAsJudgeMessageRole, + LlmAsJudgeMessageWrite, + LlmAsJudgeMessageWriteRole, + LlmAsJudgeModelParameters, + LlmAsJudgeModelParametersPublic, + LlmAsJudgeModelParametersWrite, + LlmAsJudgeOutputSchema, + LlmAsJudgeOutputSchemaPublic, + LlmAsJudgeOutputSchemaPublicType, + LlmAsJudgeOutputSchemaType, + LlmAsJudgeOutputSchemaWrite, + LlmAsJudgeOutputSchemaWriteType, Message, NumericalFeedbackDefinition, NumericalFeedbackDefinitionCreate, @@ -106,6 +137,7 @@ NumericalFeedbackDetailUpdate, PageColumns, PercentageValueStatPublic, + PercentageValues, PercentageValuesPublic, Project, ProjectMetricResponsePublic, @@ -130,10 +162,13 @@ PromptVersionPagePublic, PromptVersionPublic, ProviderApiKey, + ProviderApiKeyProvider, ProviderApiKeyPublic, + ProviderApiKeyPublicProvider, ResponseFormat, ResponseFormatType, ResultsNumberPublic, + ScoreName, Span, SpanBatch, SpanPagePublic, @@ -164,6 +199,7 @@ UnprocessableEntityError, ) from . import ( + automation_rule_evaluators, chat_completions, check, datasets, @@ -179,6 +215,7 @@ from .client import AsyncOpikApi, OpikApi from .environment import OpikApiEnvironment from .feedback_definitions import FindFeedbackDefinitionsRequestType +from .llm_provider_key import ProviderApiKeyWriteProvider from .projects import ( ProjectMetricRequestPublicInterval, ProjectMetricRequestPublicMetricType, @@ -194,6 +231,18 @@ "AssistantMessageRole", "AsyncOpikApi", "AuthDetailsHolder", + "AutomationRuleEvaluator", + "AutomationRuleEvaluatorLlmAsJudge", + "AutomationRuleEvaluatorLlmAsJudgePublic", + "AutomationRuleEvaluatorLlmAsJudgeWrite", + "AutomationRuleEvaluatorObjectPublic", + "AutomationRuleEvaluatorObjectPublic_LlmAsJudge", + "AutomationRuleEvaluatorPagePublic", + "AutomationRuleEvaluatorPublic", + "AutomationRuleEvaluatorPublic_LlmAsJudge", + "AutomationRuleEvaluatorWrite", + "AutomationRuleEvaluatorWrite_LlmAsJudge", + "AutomationRuleEvaluator_LlmAsJudge", "AvgValueStatPublic", "BadRequestError", "BatchDelete", @@ -269,6 +318,7 @@ "FeedbackScoreBatchItemSource", "FeedbackScoreCompare", "FeedbackScoreCompareSource", + "FeedbackScoreNames", "FeedbackScorePublic", "FeedbackScorePublicSource", "FeedbackScoreSource", @@ -292,6 +342,24 @@ "JsonObjectSchema", "JsonSchema", "JsonSchemaElement", + "LlmAsJudgeCode", + "LlmAsJudgeCodePublic", + "LlmAsJudgeCodeWrite", + "LlmAsJudgeMessage", + "LlmAsJudgeMessagePublic", + "LlmAsJudgeMessagePublicRole", + "LlmAsJudgeMessageRole", + "LlmAsJudgeMessageWrite", + "LlmAsJudgeMessageWriteRole", + "LlmAsJudgeModelParameters", + "LlmAsJudgeModelParametersPublic", + "LlmAsJudgeModelParametersWrite", + "LlmAsJudgeOutputSchema", + "LlmAsJudgeOutputSchemaPublic", + "LlmAsJudgeOutputSchemaPublicType", + "LlmAsJudgeOutputSchemaType", + "LlmAsJudgeOutputSchemaWrite", + "LlmAsJudgeOutputSchemaWriteType", "Message", "NotFoundError", "NotImplementedError", @@ -307,6 +375,7 @@ "OpikApiEnvironment", "PageColumns", "PercentageValueStatPublic", + "PercentageValues", "PercentageValuesPublic", "Project", "ProjectMetricRequestPublicInterval", @@ -333,10 +402,14 @@ "PromptVersionPagePublic", "PromptVersionPublic", "ProviderApiKey", + "ProviderApiKeyProvider", "ProviderApiKeyPublic", + "ProviderApiKeyPublicProvider", + "ProviderApiKeyWriteProvider", "ResponseFormat", "ResponseFormatType", "ResultsNumberPublic", + "ScoreName", "Span", "SpanBatch", "SpanPagePublic", @@ -358,6 +431,7 @@ "UnprocessableEntityError", "Usage", "WorkspaceTraceCount", + "automation_rule_evaluators", "chat_completions", "check", "datasets", diff --git a/sdks/python/src/opik/rest_api/automation_rule_evaluators/__init__.py b/sdks/python/src/opik/rest_api/automation_rule_evaluators/__init__.py new file mode 100644 index 0000000000..f3ea2659bb --- /dev/null +++ b/sdks/python/src/opik/rest_api/automation_rule_evaluators/__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/automation_rule_evaluators/client.py b/sdks/python/src/opik/rest_api/automation_rule_evaluators/client.py new file mode 100644 index 0000000000..17dd68f3d0 --- /dev/null +++ b/sdks/python/src/opik/rest_api/automation_rule_evaluators/client.py @@ -0,0 +1,724 @@ +# 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.automation_rule_evaluator_page_public import ( + AutomationRuleEvaluatorPagePublic, +) +from ..core.jsonable_encoder import jsonable_encoder +from ..core.pydantic_utilities import parse_obj_as +from json.decoder import JSONDecodeError +from ..core.api_error import ApiError +from ..types.automation_rule_evaluator_write import AutomationRuleEvaluatorWrite +from ..core.serialization import convert_and_respect_annotation_metadata +from ..types.automation_rule_evaluator_public import AutomationRuleEvaluatorPublic +from ..types.llm_as_judge_code import LlmAsJudgeCode +from ..core.client_wrapper import AsyncClientWrapper + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class AutomationRuleEvaluatorsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def find_evaluators( + self, + project_id: str, + *, + name: typing.Optional[str] = None, + page: typing.Optional[int] = None, + size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AutomationRuleEvaluatorPagePublic: + """ + Find project Evaluators + + Parameters + ---------- + project_id : str + + name : typing.Optional[str] + + page : typing.Optional[int] + + size : typing.Optional[int] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AutomationRuleEvaluatorPagePublic + Evaluators resource + + Examples + -------- + from Opik import OpikApi + + client = OpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + client.automation_rule_evaluators.find_evaluators( + project_id="projectId", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators", + method="GET", + params={ + "name": name, + "page": page, + "size": size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AutomationRuleEvaluatorPagePublic, + parse_obj_as( + type_=AutomationRuleEvaluatorPagePublic, # 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 create_automation_rule_evaluator( + self, + project_id: str, + *, + request: AutomationRuleEvaluatorWrite, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Create automation rule evaluator + + Parameters + ---------- + project_id : str + + request : AutomationRuleEvaluatorWrite + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from Opik import AutomationRuleEvaluatorWrite_LlmAsJudge, OpikApi + + client = OpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + client.automation_rule_evaluators.create_automation_rule_evaluator( + project_id="projectId", + request=AutomationRuleEvaluatorWrite_LlmAsJudge(), + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, + annotation=AutomationRuleEvaluatorWrite, + direction="write", + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _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 delete_automation_rule_evaluator_batch( + self, + project_id: str, + *, + ids: typing.Sequence[str], + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Delete automation rule evaluators batch + + Parameters + ---------- + project_id : str + + ids : typing.Sequence[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from Opik import OpikApi + + client = OpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + client.automation_rule_evaluators.delete_automation_rule_evaluator_batch( + project_id="projectId", + ids=["ids"], + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators/delete", + method="POST", + json={ + "ids": ids, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _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 get_evaluator_by_id( + self, + project_id: str, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> AutomationRuleEvaluatorPublic: + """ + Get automation rule by id + + Parameters + ---------- + project_id : str + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AutomationRuleEvaluatorPublic + Automation Rule resource + + Examples + -------- + from Opik import OpikApi + + client = OpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + client.automation_rule_evaluators.get_evaluator_by_id( + project_id="projectId", + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AutomationRuleEvaluatorPublic, + parse_obj_as( + type_=AutomationRuleEvaluatorPublic, # 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_automation_rule_evaluator( + self, + id: str, + project_id: str, + *, + name: str, + code: LlmAsJudgeCode, + sampling_rate: float, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + update Automation Rule Evaluator by id + + Parameters + ---------- + id : str + + project_id : str + + name : str + + code : LlmAsJudgeCode + + sampling_rate : float + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from Opik import ( + LlmAsJudgeCode, + LlmAsJudgeMessage, + LlmAsJudgeModelParameters, + LlmAsJudgeOutputSchema, + OpikApi, + ) + + client = OpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + client.automation_rule_evaluators.update_automation_rule_evaluator( + id="id", + project_id="projectId", + name="name", + code=LlmAsJudgeCode( + model=LlmAsJudgeModelParameters( + name="name", + temperature=1.1, + ), + messages=[ + LlmAsJudgeMessage( + role="SYSTEM", + content="content", + ) + ], + variables={"key": "value"}, + schema=[ + LlmAsJudgeOutputSchema( + name="name", + type="BOOLEAN", + description="description", + ) + ], + ), + sampling_rate=1.1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "code": convert_and_respect_annotation_metadata( + object_=code, annotation=LlmAsJudgeCode, direction="write" + ), + "sampling_rate": sampling_rate, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _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 AsyncAutomationRuleEvaluatorsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def find_evaluators( + self, + project_id: str, + *, + name: typing.Optional[str] = None, + page: typing.Optional[int] = None, + size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AutomationRuleEvaluatorPagePublic: + """ + Find project Evaluators + + Parameters + ---------- + project_id : str + + name : typing.Optional[str] + + page : typing.Optional[int] + + size : typing.Optional[int] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AutomationRuleEvaluatorPagePublic + Evaluators resource + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + + + async def main() -> None: + await client.automation_rule_evaluators.find_evaluators( + project_id="projectId", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators", + method="GET", + params={ + "name": name, + "page": page, + "size": size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AutomationRuleEvaluatorPagePublic, + parse_obj_as( + type_=AutomationRuleEvaluatorPagePublic, # 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 create_automation_rule_evaluator( + self, + project_id: str, + *, + request: AutomationRuleEvaluatorWrite, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Create automation rule evaluator + + Parameters + ---------- + project_id : str + + request : AutomationRuleEvaluatorWrite + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi, AutomationRuleEvaluatorWrite_LlmAsJudge + + client = AsyncOpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + + + async def main() -> None: + await client.automation_rule_evaluators.create_automation_rule_evaluator( + project_id="projectId", + request=AutomationRuleEvaluatorWrite_LlmAsJudge(), + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators", + method="POST", + json=convert_and_respect_annotation_metadata( + object_=request, + annotation=AutomationRuleEvaluatorWrite, + direction="write", + ), + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _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 delete_automation_rule_evaluator_batch( + self, + project_id: str, + *, + ids: typing.Sequence[str], + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Delete automation rule evaluators batch + + Parameters + ---------- + project_id : str + + ids : typing.Sequence[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + + + async def main() -> None: + await client.automation_rule_evaluators.delete_automation_rule_evaluator_batch( + project_id="projectId", + ids=["ids"], + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators/delete", + method="POST", + json={ + "ids": ids, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _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 get_evaluator_by_id( + self, + project_id: str, + id: str, + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> AutomationRuleEvaluatorPublic: + """ + Get automation rule by id + + Parameters + ---------- + project_id : str + + id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AutomationRuleEvaluatorPublic + Automation Rule resource + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + + + async def main() -> None: + await client.automation_rule_evaluators.get_evaluator_by_id( + project_id="projectId", + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators/{jsonable_encoder(id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + AutomationRuleEvaluatorPublic, + parse_obj_as( + type_=AutomationRuleEvaluatorPublic, # 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_automation_rule_evaluator( + self, + id: str, + project_id: str, + *, + name: str, + code: LlmAsJudgeCode, + sampling_rate: float, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + update Automation Rule Evaluator by id + + Parameters + ---------- + id : str + + project_id : str + + name : str + + code : LlmAsJudgeCode + + sampling_rate : float + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from Opik import ( + AsyncOpikApi, + LlmAsJudgeCode, + LlmAsJudgeMessage, + LlmAsJudgeModelParameters, + LlmAsJudgeOutputSchema, + ) + + client = AsyncOpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + + + async def main() -> None: + await client.automation_rule_evaluators.update_automation_rule_evaluator( + id="id", + project_id="projectId", + name="name", + code=LlmAsJudgeCode( + model=LlmAsJudgeModelParameters( + name="name", + temperature=1.1, + ), + messages=[ + LlmAsJudgeMessage( + role="SYSTEM", + content="content", + ) + ], + variables={"key": "value"}, + schema=[ + LlmAsJudgeOutputSchema( + name="name", + type="BOOLEAN", + description="description", + ) + ], + ), + sampling_rate=1.1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/private/automations/projects/{jsonable_encoder(project_id)}/evaluators/{jsonable_encoder(id)}", + method="PATCH", + json={ + "name": name, + "code": convert_and_respect_annotation_metadata( + object_=code, annotation=LlmAsJudgeCode, direction="write" + ), + "sampling_rate": sampling_rate, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return + _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 c7b54f0faf..23397c1914 100644 --- a/sdks/python/src/opik/rest_api/client.py +++ b/sdks/python/src/opik/rest_api/client.py @@ -6,6 +6,7 @@ from .core.client_wrapper import SyncClientWrapper from .system_usage.client import SystemUsageClient from .check.client import CheckClient +from .automation_rule_evaluators.client import AutomationRuleEvaluatorsClient from .chat_completions.client import ChatCompletionsClient from .datasets.client import DatasetsClient from .experiments.client import ExperimentsClient @@ -22,6 +23,7 @@ from .core.client_wrapper import AsyncClientWrapper from .system_usage.client import AsyncSystemUsageClient from .check.client import AsyncCheckClient +from .automation_rule_evaluators.client import AsyncAutomationRuleEvaluatorsClient from .chat_completions.client import AsyncChatCompletionsClient from .datasets.client import AsyncDatasetsClient from .experiments.client import AsyncExperimentsClient @@ -101,6 +103,9 @@ def __init__( ) self.system_usage = SystemUsageClient(client_wrapper=self._client_wrapper) self.check = CheckClient(client_wrapper=self._client_wrapper) + self.automation_rule_evaluators = AutomationRuleEvaluatorsClient( + client_wrapper=self._client_wrapper + ) self.chat_completions = ChatCompletionsClient( client_wrapper=self._client_wrapper ) @@ -272,6 +277,9 @@ def __init__( ) self.system_usage = AsyncSystemUsageClient(client_wrapper=self._client_wrapper) self.check = AsyncCheckClient(client_wrapper=self._client_wrapper) + self.automation_rule_evaluators = AsyncAutomationRuleEvaluatorsClient( + client_wrapper=self._client_wrapper + ) self.chat_completions = AsyncChatCompletionsClient( 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 8e2d22d866..00cdd6dbd6 100644 --- a/sdks/python/src/opik/rest_api/datasets/client.py +++ b/sdks/python/src/opik/rest_api/datasets/client.py @@ -198,6 +198,7 @@ def create_or_update_dataset_items( items=[ DatasetItemWrite( source="manual", + data={"key": "value"}, ) ], ) @@ -1095,6 +1096,7 @@ async def main() -> None: items=[ DatasetItemWrite( source="manual", + data={"key": "value"}, ) ], ) diff --git a/sdks/python/src/opik/rest_api/experiments/client.py b/sdks/python/src/opik/rest_api/experiments/client.py index 68f219a6a8..4827dd1098 100644 --- a/sdks/python/src/opik/rest_api/experiments/client.py +++ b/sdks/python/src/opik/rest_api/experiments/client.py @@ -579,6 +579,7 @@ def stream_experiment_items( experiment_name: str, limit: typing.Optional[int] = OMIT, last_retrieved_id: typing.Optional[str] = OMIT, + truncate: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Iterator[bytes]: """ @@ -592,6 +593,9 @@ def stream_experiment_items( last_retrieved_id : typing.Optional[str] + truncate : typing.Optional[bool] + Truncate image included in either input, output or metadata + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -607,6 +611,7 @@ def stream_experiment_items( "experiment_name": experiment_name, "limit": limit, "last_retrieved_id": last_retrieved_id, + "truncate": truncate, }, headers={ "content-type": "application/json", @@ -1261,6 +1266,7 @@ async def stream_experiment_items( experiment_name: str, limit: typing.Optional[int] = OMIT, last_retrieved_id: typing.Optional[str] = OMIT, + truncate: typing.Optional[bool] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.AsyncIterator[bytes]: """ @@ -1274,6 +1280,9 @@ async def stream_experiment_items( last_retrieved_id : typing.Optional[str] + truncate : typing.Optional[bool] + Truncate image included in either input, output or metadata + request_options : typing.Optional[RequestOptions] Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. @@ -1289,6 +1298,7 @@ async def stream_experiment_items( "experiment_name": experiment_name, "limit": limit, "last_retrieved_id": last_retrieved_id, + "truncate": truncate, }, headers={ "content-type": "application/json", 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 index f3ea2659bb..f87ae233fd 100644 --- a/sdks/python/src/opik/rest_api/llm_provider_key/__init__.py +++ b/sdks/python/src/opik/rest_api/llm_provider_key/__init__.py @@ -1,2 +1,5 @@ # This file was auto-generated by Fern from our API Definition. +from .types import ProviderApiKeyWriteProvider + +__all__ = ["ProviderApiKeyWriteProvider"] 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 index 8520937c0c..768b515a92 100644 --- a/sdks/python/src/opik/rest_api/llm_provider_key/client.py +++ b/sdks/python/src/opik/rest_api/llm_provider_key/client.py @@ -7,6 +7,7 @@ from ..core.api_error import ApiError from ..types.project_page_public import ProjectPagePublic from ..core.pydantic_utilities import parse_obj_as +from .types.provider_api_key_write_provider import ProviderApiKeyWriteProvider from ..errors.unauthorized_error import UnauthorizedError from ..types.error_message import ErrorMessage from ..errors.forbidden_error import ForbiddenError @@ -118,15 +119,24 @@ def find_llm_provider_keys( raise ApiError(status_code=_response.status_code, body=_response_json) def store_llm_provider_api_key( - self, *, api_key: str, request_options: typing.Optional[RequestOptions] = None + self, + *, + provider: ProviderApiKeyWriteProvider, + api_key: str, + name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Store LLM Provider's ApiKey Parameters ---------- + provider : ProviderApiKeyWriteProvider + api_key : str + name : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -143,6 +153,7 @@ def store_llm_provider_api_key( workspace_name="YOUR_WORKSPACE_NAME", ) client.llm_provider_key.store_llm_provider_api_key( + provider="openai", api_key="api_key", ) """ @@ -150,8 +161,9 @@ def store_llm_provider_api_key( "v1/private/llm-provider-key", method="POST", json={ + "provider": provider, "api_key": api_key, - "provider": "openai", + "name": name, }, headers={ "content-type": "application/json", @@ -251,6 +263,7 @@ def update_llm_provider_api_key( id: str, *, api_key: str, + name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -262,6 +275,8 @@ def update_llm_provider_api_key( api_key : str + name : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -287,6 +302,7 @@ def update_llm_provider_api_key( method="PATCH", json={ "api_key": api_key, + "name": name, }, headers={ "content-type": "application/json", @@ -448,15 +464,24 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response_json) async def store_llm_provider_api_key( - self, *, api_key: str, request_options: typing.Optional[RequestOptions] = None + self, + *, + provider: ProviderApiKeyWriteProvider, + api_key: str, + name: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Store LLM Provider's ApiKey Parameters ---------- + provider : ProviderApiKeyWriteProvider + api_key : str + name : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -478,6 +503,7 @@ async def store_llm_provider_api_key( async def main() -> None: await client.llm_provider_key.store_llm_provider_api_key( + provider="openai", api_key="api_key", ) @@ -488,8 +514,9 @@ async def main() -> None: "v1/private/llm-provider-key", method="POST", json={ + "provider": provider, "api_key": api_key, - "provider": "openai", + "name": name, }, headers={ "content-type": "application/json", @@ -597,6 +624,7 @@ async def update_llm_provider_api_key( id: str, *, api_key: str, + name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -608,6 +636,8 @@ async def update_llm_provider_api_key( api_key : str + name : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -641,6 +671,7 @@ async def main() -> None: method="PATCH", json={ "api_key": api_key, + "name": name, }, headers={ "content-type": "application/json", diff --git a/sdks/python/src/opik/rest_api/llm_provider_key/types/__init__.py b/sdks/python/src/opik/rest_api/llm_provider_key/types/__init__.py new file mode 100644 index 0000000000..97e4c73ba5 --- /dev/null +++ b/sdks/python/src/opik/rest_api/llm_provider_key/types/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .provider_api_key_write_provider import ProviderApiKeyWriteProvider + +__all__ = ["ProviderApiKeyWriteProvider"] diff --git a/sdks/python/src/opik/rest_api/llm_provider_key/types/provider_api_key_write_provider.py b/sdks/python/src/opik/rest_api/llm_provider_key/types/provider_api_key_write_provider.py new file mode 100644 index 0000000000..c4d407d0d7 --- /dev/null +++ b/sdks/python/src/opik/rest_api/llm_provider_key/types/provider_api_key_write_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderApiKeyWriteProvider = typing.Union[ + typing.Literal["openai", "anthropic"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/projects/client.py b/sdks/python/src/opik/rest_api/projects/client.py index 54ead43892..b4b0d2da0f 100644 --- a/sdks/python/src/opik/rest_api/projects/client.py +++ b/sdks/python/src/opik/rest_api/projects/client.py @@ -12,6 +12,7 @@ from ..types.project_public import ProjectPublic from ..core.jsonable_encoder import jsonable_encoder from ..errors.conflict_error import ConflictError +from ..types.feedback_score_names import FeedbackScoreNames from .types.project_metric_request_public_metric_type import ( ProjectMetricRequestPublicMetricType, ) @@ -401,6 +402,59 @@ def delete_projects_batch( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def find_feedback_score_names_by_project_ids( + self, + *, + project_ids: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> FeedbackScoreNames: + """ + Find Feedback Score names By Project Ids + + Parameters + ---------- + project_ids : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FeedbackScoreNames + Feedback Scores resource + + Examples + -------- + from Opik import OpikApi + + client = OpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + client.projects.find_feedback_score_names_by_project_ids() + """ + _response = self._client_wrapper.httpx_client.request( + "v1/private/projects/feedback-scores/names", + method="GET", + params={ + "project_ids": project_ids, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + FeedbackScoreNames, + parse_obj_as( + type_=FeedbackScoreNames, # 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 get_project_metrics( self, id: str, @@ -1004,6 +1058,67 @@ 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 find_feedback_score_names_by_project_ids( + self, + *, + project_ids: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> FeedbackScoreNames: + """ + Find Feedback Score names By Project Ids + + Parameters + ---------- + project_ids : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + FeedbackScoreNames + Feedback Scores resource + + Examples + -------- + import asyncio + + from Opik import AsyncOpikApi + + client = AsyncOpikApi( + api_key="YOUR_API_KEY", + workspace_name="YOUR_WORKSPACE_NAME", + ) + + + async def main() -> None: + await client.projects.find_feedback_score_names_by_project_ids() + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/private/projects/feedback-scores/names", + method="GET", + params={ + "project_ids": project_ids, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + FeedbackScoreNames, + parse_obj_as( + type_=FeedbackScoreNames, # 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 get_project_metrics( self, id: str, diff --git a/sdks/python/src/opik/rest_api/spans/client.py b/sdks/python/src/opik/rest_api/spans/client.py index 7631d856ab..f3f21f2bcd 100644 --- a/sdks/python/src/opik/rest_api/spans/client.py +++ b/sdks/python/src/opik/rest_api/spans/client.py @@ -224,6 +224,8 @@ def create_span( tags: typing.Optional[typing.Sequence[str]] = OMIT, usage: typing.Optional[typing.Dict[str, int]] = OMIT, error_info: typing.Optional[ErrorInfoWrite] = OMIT, + total_estimated_cost: typing.Optional[float] = OMIT, + total_estimated_cost_version: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -264,6 +266,10 @@ def create_span( error_info : typing.Optional[ErrorInfoWrite] + total_estimated_cost : typing.Optional[float] + + total_estimated_cost_version : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -312,6 +318,8 @@ def create_span( "error_info": convert_and_respect_annotation_metadata( object_=error_info, annotation=ErrorInfoWrite, direction="write" ), + "total_estimated_cost": total_estimated_cost, + "total_estimated_cost_version": total_estimated_cost_version, }, request_options=request_options, omit=OMIT, @@ -518,6 +526,7 @@ def update_span( provider: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, usage: typing.Optional[typing.Dict[str, int]] = OMIT, + total_estimated_cost: typing.Optional[float] = OMIT, error_info: typing.Optional[ErrorInfo] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: @@ -554,6 +563,8 @@ def update_span( usage : typing.Optional[typing.Dict[str, int]] + total_estimated_cost : typing.Optional[float] + error_info : typing.Optional[ErrorInfo] request_options : typing.Optional[RequestOptions] @@ -592,6 +603,7 @@ def update_span( "provider": provider, "tags": tags, "usage": usage, + "total_estimated_cost": total_estimated_cost, "error_info": convert_and_respect_annotation_metadata( object_=error_info, annotation=ErrorInfo, direction="write" ), @@ -1067,6 +1079,8 @@ async def create_span( tags: typing.Optional[typing.Sequence[str]] = OMIT, usage: typing.Optional[typing.Dict[str, int]] = OMIT, error_info: typing.Optional[ErrorInfoWrite] = OMIT, + total_estimated_cost: typing.Optional[float] = OMIT, + total_estimated_cost_version: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ @@ -1107,6 +1121,10 @@ async def create_span( error_info : typing.Optional[ErrorInfoWrite] + total_estimated_cost : typing.Optional[float] + + total_estimated_cost_version : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1162,6 +1180,8 @@ async def main() -> None: "error_info": convert_and_respect_annotation_metadata( object_=error_info, annotation=ErrorInfoWrite, direction="write" ), + "total_estimated_cost": total_estimated_cost, + "total_estimated_cost_version": total_estimated_cost_version, }, request_options=request_options, omit=OMIT, @@ -1391,6 +1411,7 @@ async def update_span( provider: typing.Optional[str] = OMIT, tags: typing.Optional[typing.Sequence[str]] = OMIT, usage: typing.Optional[typing.Dict[str, int]] = OMIT, + total_estimated_cost: typing.Optional[float] = OMIT, error_info: typing.Optional[ErrorInfo] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> None: @@ -1427,6 +1448,8 @@ async def update_span( usage : typing.Optional[typing.Dict[str, int]] + total_estimated_cost : typing.Optional[float] + error_info : typing.Optional[ErrorInfo] request_options : typing.Optional[RequestOptions] @@ -1473,6 +1496,7 @@ async def main() -> None: "provider": provider, "tags": tags, "usage": usage, + "total_estimated_cost": total_estimated_cost, "error_info": convert_and_respect_annotation_metadata( object_=error_info, annotation=ErrorInfo, direction="write" ), diff --git a/sdks/python/src/opik/rest_api/types/__init__.py b/sdks/python/src/opik/rest_api/types/__init__.py index e7c90634c3..24b5948ed9 100644 --- a/sdks/python/src/opik/rest_api/types/__init__.py +++ b/sdks/python/src/opik/rest_api/types/__init__.py @@ -3,6 +3,30 @@ from .assistant_message import AssistantMessage from .assistant_message_role import AssistantMessageRole from .auth_details_holder import AuthDetailsHolder +from .automation_rule_evaluator import ( + AutomationRuleEvaluator, + AutomationRuleEvaluator_LlmAsJudge, +) +from .automation_rule_evaluator_llm_as_judge import AutomationRuleEvaluatorLlmAsJudge +from .automation_rule_evaluator_llm_as_judge_public import ( + AutomationRuleEvaluatorLlmAsJudgePublic, +) +from .automation_rule_evaluator_llm_as_judge_write import ( + AutomationRuleEvaluatorLlmAsJudgeWrite, +) +from .automation_rule_evaluator_object_public import ( + AutomationRuleEvaluatorObjectPublic, + AutomationRuleEvaluatorObjectPublic_LlmAsJudge, +) +from .automation_rule_evaluator_page_public import AutomationRuleEvaluatorPagePublic +from .automation_rule_evaluator_public import ( + AutomationRuleEvaluatorPublic, + AutomationRuleEvaluatorPublic_LlmAsJudge, +) +from .automation_rule_evaluator_write import ( + AutomationRuleEvaluatorWrite, + AutomationRuleEvaluatorWrite_LlmAsJudge, +) from .avg_value_stat_public import AvgValueStatPublic from .batch_delete import BatchDelete from .bi_information import BiInformation @@ -82,6 +106,7 @@ from .feedback_score_batch_item_source import FeedbackScoreBatchItemSource from .feedback_score_compare import FeedbackScoreCompare from .feedback_score_compare_source import FeedbackScoreCompareSource +from .feedback_score_names import FeedbackScoreNames from .feedback_score_public import FeedbackScorePublic from .feedback_score_public_source import FeedbackScorePublicSource from .feedback_score_source import FeedbackScoreSource @@ -100,6 +125,24 @@ from .json_object_schema import JsonObjectSchema from .json_schema import JsonSchema from .json_schema_element import JsonSchemaElement +from .llm_as_judge_code import LlmAsJudgeCode +from .llm_as_judge_code_public import LlmAsJudgeCodePublic +from .llm_as_judge_code_write import LlmAsJudgeCodeWrite +from .llm_as_judge_message import LlmAsJudgeMessage +from .llm_as_judge_message_public import LlmAsJudgeMessagePublic +from .llm_as_judge_message_public_role import LlmAsJudgeMessagePublicRole +from .llm_as_judge_message_role import LlmAsJudgeMessageRole +from .llm_as_judge_message_write import LlmAsJudgeMessageWrite +from .llm_as_judge_message_write_role import LlmAsJudgeMessageWriteRole +from .llm_as_judge_model_parameters import LlmAsJudgeModelParameters +from .llm_as_judge_model_parameters_public import LlmAsJudgeModelParametersPublic +from .llm_as_judge_model_parameters_write import LlmAsJudgeModelParametersWrite +from .llm_as_judge_output_schema import LlmAsJudgeOutputSchema +from .llm_as_judge_output_schema_public import LlmAsJudgeOutputSchemaPublic +from .llm_as_judge_output_schema_public_type import LlmAsJudgeOutputSchemaPublicType +from .llm_as_judge_output_schema_type import LlmAsJudgeOutputSchemaType +from .llm_as_judge_output_schema_write import LlmAsJudgeOutputSchemaWrite +from .llm_as_judge_output_schema_write_type import LlmAsJudgeOutputSchemaWriteType from .message import Message from .numerical_feedback_definition import NumericalFeedbackDefinition from .numerical_feedback_definition_create import NumericalFeedbackDefinitionCreate @@ -111,6 +154,7 @@ from .numerical_feedback_detail_update import NumericalFeedbackDetailUpdate from .page_columns import PageColumns from .percentage_value_stat_public import PercentageValueStatPublic +from .percentage_values import PercentageValues from .percentage_values_public import PercentageValuesPublic from .project import Project from .project_metric_response_public import ProjectMetricResponsePublic @@ -139,10 +183,13 @@ from .prompt_version_page_public import PromptVersionPagePublic from .prompt_version_public import PromptVersionPublic from .provider_api_key import ProviderApiKey +from .provider_api_key_provider import ProviderApiKeyProvider from .provider_api_key_public import ProviderApiKeyPublic +from .provider_api_key_public_provider import ProviderApiKeyPublicProvider from .response_format import ResponseFormat from .response_format_type import ResponseFormatType from .results_number_public import ResultsNumberPublic +from .score_name import ScoreName from .span import Span from .span_batch import SpanBatch from .span_page_public import SpanPagePublic @@ -167,6 +214,18 @@ "AssistantMessage", "AssistantMessageRole", "AuthDetailsHolder", + "AutomationRuleEvaluator", + "AutomationRuleEvaluatorLlmAsJudge", + "AutomationRuleEvaluatorLlmAsJudgePublic", + "AutomationRuleEvaluatorLlmAsJudgeWrite", + "AutomationRuleEvaluatorObjectPublic", + "AutomationRuleEvaluatorObjectPublic_LlmAsJudge", + "AutomationRuleEvaluatorPagePublic", + "AutomationRuleEvaluatorPublic", + "AutomationRuleEvaluatorPublic_LlmAsJudge", + "AutomationRuleEvaluatorWrite", + "AutomationRuleEvaluatorWrite_LlmAsJudge", + "AutomationRuleEvaluator_LlmAsJudge", "AvgValueStatPublic", "BatchDelete", "BiInformation", @@ -240,6 +299,7 @@ "FeedbackScoreBatchItemSource", "FeedbackScoreCompare", "FeedbackScoreCompareSource", + "FeedbackScoreNames", "FeedbackScorePublic", "FeedbackScorePublicSource", "FeedbackScoreSource", @@ -258,6 +318,24 @@ "JsonObjectSchema", "JsonSchema", "JsonSchemaElement", + "LlmAsJudgeCode", + "LlmAsJudgeCodePublic", + "LlmAsJudgeCodeWrite", + "LlmAsJudgeMessage", + "LlmAsJudgeMessagePublic", + "LlmAsJudgeMessagePublicRole", + "LlmAsJudgeMessageRole", + "LlmAsJudgeMessageWrite", + "LlmAsJudgeMessageWriteRole", + "LlmAsJudgeModelParameters", + "LlmAsJudgeModelParametersPublic", + "LlmAsJudgeModelParametersWrite", + "LlmAsJudgeOutputSchema", + "LlmAsJudgeOutputSchemaPublic", + "LlmAsJudgeOutputSchemaPublicType", + "LlmAsJudgeOutputSchemaType", + "LlmAsJudgeOutputSchemaWrite", + "LlmAsJudgeOutputSchemaWriteType", "Message", "NumericalFeedbackDefinition", "NumericalFeedbackDefinitionCreate", @@ -269,6 +347,7 @@ "NumericalFeedbackDetailUpdate", "PageColumns", "PercentageValueStatPublic", + "PercentageValues", "PercentageValuesPublic", "Project", "ProjectMetricResponsePublic", @@ -293,10 +372,13 @@ "PromptVersionPagePublic", "PromptVersionPublic", "ProviderApiKey", + "ProviderApiKeyProvider", "ProviderApiKeyPublic", + "ProviderApiKeyPublicProvider", "ResponseFormat", "ResponseFormatType", "ResultsNumberPublic", + "ScoreName", "Span", "SpanBatch", "SpanPagePublic", diff --git a/sdks/python/src/opik/rest_api/types/automation_rule_evaluator.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator.py new file mode 100644 index 0000000000..dcaa2b4c67 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import typing_extensions +from ..core.serialization import FieldMetadata +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .llm_as_judge_code import LlmAsJudgeCode + + +class Base(UniversalBaseModel): + id: typing.Optional[str] = None + project_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="projectId") + ] = None + name: str + sampling_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="samplingRate") + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAt") + ] = None + created_by: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="createdBy") + ] = None + last_updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="lastUpdatedAt") + ] = None + last_updated_by: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="lastUpdatedBy") + ] = None + action: typing.Optional[typing.Literal["evaluator"]] = 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 + + +class AutomationRuleEvaluator_LlmAsJudge(Base): + type: typing.Literal["llm_as_judge"] = "llm_as_judge" + code: typing.Optional[LlmAsJudgeCode] = 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 + + +AutomationRuleEvaluator = AutomationRuleEvaluator_LlmAsJudge diff --git a/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge.py new file mode 100644 index 0000000000..9c2ab3104b --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge.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 .llm_as_judge_code import LlmAsJudgeCode +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class AutomationRuleEvaluatorLlmAsJudge(UniversalBaseModel): + code: typing.Optional[LlmAsJudgeCode] = 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/automation_rule_evaluator_llm_as_judge_public.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge_public.py new file mode 100644 index 0000000000..f404b69582 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge_public.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 .llm_as_judge_code_public import LlmAsJudgeCodePublic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class AutomationRuleEvaluatorLlmAsJudgePublic(UniversalBaseModel): + code: typing.Optional[LlmAsJudgeCodePublic] = 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/automation_rule_evaluator_llm_as_judge_write.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge_write.py new file mode 100644 index 0000000000..ee113f3fba --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_llm_as_judge_write.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 .llm_as_judge_code_write import LlmAsJudgeCodeWrite +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class AutomationRuleEvaluatorLlmAsJudgeWrite(UniversalBaseModel): + code: typing.Optional[LlmAsJudgeCodeWrite] = 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/automation_rule_evaluator_object_public.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_object_public.py new file mode 100644 index 0000000000..96eb0ced24 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_object_public.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import typing_extensions +from ..core.serialization import FieldMetadata +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .llm_as_judge_code_public import LlmAsJudgeCodePublic + + +class Base(UniversalBaseModel): + id: typing.Optional[str] = None + project_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="projectId") + ] = None + name: str + sampling_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="samplingRate") + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAt") + ] = None + created_by: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="createdBy") + ] = None + last_updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="lastUpdatedAt") + ] = None + last_updated_by: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="lastUpdatedBy") + ] = None + action: typing.Optional[typing.Literal["evaluator"]] = 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 + + +class AutomationRuleEvaluatorObjectPublic_LlmAsJudge(Base): + type: typing.Literal["llm_as_judge"] = "llm_as_judge" + code: typing.Optional[LlmAsJudgeCodePublic] = 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 + + +AutomationRuleEvaluatorObjectPublic = AutomationRuleEvaluatorObjectPublic_LlmAsJudge diff --git a/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_page_public.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_page_public.py new file mode 100644 index 0000000000..b05f1fb41b --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_page_public.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 .automation_rule_evaluator_object_public import AutomationRuleEvaluatorObjectPublic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class AutomationRuleEvaluatorPagePublic(UniversalBaseModel): + page: typing.Optional[int] = None + size: typing.Optional[int] = None + total: typing.Optional[int] = None + content: typing.Optional[typing.List[AutomationRuleEvaluatorObjectPublic]] = 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/automation_rule_evaluator_public.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_public.py new file mode 100644 index 0000000000..3805ff57c4 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_public.py @@ -0,0 +1,65 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +import typing_extensions +from ..core.serialization import FieldMetadata +import datetime as dt +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .llm_as_judge_code_public import LlmAsJudgeCodePublic + + +class Base(UniversalBaseModel): + id: typing.Optional[str] = None + project_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="projectId") + ] = None + name: str + sampling_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="samplingRate") + ] = None + created_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="createdAt") + ] = None + created_by: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="createdBy") + ] = None + last_updated_at: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="lastUpdatedAt") + ] = None + last_updated_by: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="lastUpdatedBy") + ] = None + action: typing.Optional[typing.Literal["evaluator"]] = 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 + + +class AutomationRuleEvaluatorPublic_LlmAsJudge(Base): + type: typing.Literal["llm_as_judge"] = "llm_as_judge" + code: typing.Optional[LlmAsJudgeCodePublic] = 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 + + +AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic_LlmAsJudge diff --git a/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_write.py b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_write.py new file mode 100644 index 0000000000..33c8cf87c9 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/automation_rule_evaluator_write.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing_extensions +import typing +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .llm_as_judge_code_write import LlmAsJudgeCodeWrite + + +class Base(UniversalBaseModel): + name: str + sampling_rate: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="samplingRate") + ] = None + action: typing.Optional[typing.Literal["evaluator"]] = 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 + + +class AutomationRuleEvaluatorWrite_LlmAsJudge(Base): + type: typing.Literal["llm_as_judge"] = "llm_as_judge" + code: typing.Optional[LlmAsJudgeCodeWrite] = 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 + + +AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite_LlmAsJudge diff --git a/sdks/python/src/opik/rest_api/types/dataset_item.py b/sdks/python/src/opik/rest_api/types/dataset_item.py index 1b07a11d22..6e080c8a41 100644 --- a/sdks/python/src/opik/rest_api/types/dataset_item.py +++ b/sdks/python/src/opik/rest_api/types/dataset_item.py @@ -2,8 +2,8 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing -from .json_node import JsonNode from .dataset_item_source import DatasetItemSource +from .json_node import JsonNode from .experiment_item import ExperimentItem import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -12,13 +12,10 @@ class DatasetItem(UniversalBaseModel): id: typing.Optional[str] = None - input: typing.Optional[JsonNode] = None - expected_output: typing.Optional[JsonNode] = None - metadata: typing.Optional[JsonNode] = None trace_id: typing.Optional[str] = None span_id: typing.Optional[str] = None source: DatasetItemSource - data: typing.Optional[JsonNode] = None + data: JsonNode experiment_items: typing.Optional[typing.List[ExperimentItem]] = None created_at: typing.Optional[dt.datetime] = None last_updated_at: typing.Optional[dt.datetime] = None diff --git a/sdks/python/src/opik/rest_api/types/dataset_item_compare.py b/sdks/python/src/opik/rest_api/types/dataset_item_compare.py index 49a01e543f..e539fcc7b5 100644 --- a/sdks/python/src/opik/rest_api/types/dataset_item_compare.py +++ b/sdks/python/src/opik/rest_api/types/dataset_item_compare.py @@ -2,7 +2,6 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing -from .json_node_compare import JsonNodeCompare from .dataset_item_compare_source import DatasetItemCompareSource from .json_node import JsonNode from .experiment_item_compare import ExperimentItemCompare @@ -13,13 +12,10 @@ class DatasetItemCompare(UniversalBaseModel): id: typing.Optional[str] = None - input: typing.Optional[JsonNodeCompare] = None - expected_output: typing.Optional[JsonNodeCompare] = None - metadata: typing.Optional[JsonNodeCompare] = None trace_id: typing.Optional[str] = None span_id: typing.Optional[str] = None source: DatasetItemCompareSource - data: typing.Optional[JsonNode] = None + data: JsonNode experiment_items: typing.Optional[typing.List[ExperimentItemCompare]] = None created_at: typing.Optional[dt.datetime] = None last_updated_at: typing.Optional[dt.datetime] = None diff --git a/sdks/python/src/opik/rest_api/types/dataset_item_public.py b/sdks/python/src/opik/rest_api/types/dataset_item_public.py index 98fe67adcd..9249e234f6 100644 --- a/sdks/python/src/opik/rest_api/types/dataset_item_public.py +++ b/sdks/python/src/opik/rest_api/types/dataset_item_public.py @@ -2,7 +2,6 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing -from .json_node_public import JsonNodePublic from .dataset_item_public_source import DatasetItemPublicSource from .json_node import JsonNode from .experiment_item_public import ExperimentItemPublic @@ -13,13 +12,10 @@ class DatasetItemPublic(UniversalBaseModel): id: typing.Optional[str] = None - input: typing.Optional[JsonNodePublic] = None - expected_output: typing.Optional[JsonNodePublic] = None - metadata: typing.Optional[JsonNodePublic] = None trace_id: typing.Optional[str] = None span_id: typing.Optional[str] = None source: DatasetItemPublicSource - data: typing.Optional[JsonNode] = None + data: JsonNode experiment_items: typing.Optional[typing.List[ExperimentItemPublic]] = None created_at: typing.Optional[dt.datetime] = None last_updated_at: typing.Optional[dt.datetime] = None diff --git a/sdks/python/src/opik/rest_api/types/dataset_item_write.py b/sdks/python/src/opik/rest_api/types/dataset_item_write.py index e3ed37e2f3..913e3ca8bc 100644 --- a/sdks/python/src/opik/rest_api/types/dataset_item_write.py +++ b/sdks/python/src/opik/rest_api/types/dataset_item_write.py @@ -2,7 +2,6 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing -from .json_node_write import JsonNodeWrite from .dataset_item_write_source import DatasetItemWriteSource from .json_node import JsonNode from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -11,13 +10,10 @@ class DatasetItemWrite(UniversalBaseModel): id: typing.Optional[str] = None - input: typing.Optional[JsonNodeWrite] = None - expected_output: typing.Optional[JsonNodeWrite] = None - metadata: typing.Optional[JsonNodeWrite] = None trace_id: typing.Optional[str] = None span_id: typing.Optional[str] = None source: DatasetItemWriteSource - data: typing.Optional[JsonNode] = None + data: JsonNode if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/sdks/python/src/opik/rest_api/types/feedback_score_names.py b/sdks/python/src/opik/rest_api/types/feedback_score_names.py new file mode 100644 index 0000000000..61659c0a7a --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/feedback_score_names.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 .score_name import ScoreName +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class FeedbackScoreNames(UniversalBaseModel): + scores: typing.Optional[typing.List[ScoreName]] = 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/llm_as_judge_code.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_code.py new file mode 100644 index 0000000000..c4f6c4f239 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_code.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_model_parameters import LlmAsJudgeModelParameters +import typing +from .llm_as_judge_message import LlmAsJudgeMessage +import typing_extensions +from .llm_as_judge_output_schema import LlmAsJudgeOutputSchema +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class LlmAsJudgeCode(UniversalBaseModel): + model: LlmAsJudgeModelParameters + messages: typing.List[LlmAsJudgeMessage] + variables: typing.Dict[str, str] + schema_: typing_extensions.Annotated[ + typing.List[LlmAsJudgeOutputSchema], FieldMetadata(alias="schema") + ] + + 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/llm_as_judge_code_public.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_code_public.py new file mode 100644 index 0000000000..785c56307b --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_code_public.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_model_parameters_public import LlmAsJudgeModelParametersPublic +import typing +from .llm_as_judge_message_public import LlmAsJudgeMessagePublic +import typing_extensions +from .llm_as_judge_output_schema_public import LlmAsJudgeOutputSchemaPublic +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class LlmAsJudgeCodePublic(UniversalBaseModel): + model: LlmAsJudgeModelParametersPublic + messages: typing.List[LlmAsJudgeMessagePublic] + variables: typing.Dict[str, str] + schema_: typing_extensions.Annotated[ + typing.List[LlmAsJudgeOutputSchemaPublic], FieldMetadata(alias="schema") + ] + + 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/llm_as_judge_code_write.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_code_write.py new file mode 100644 index 0000000000..5e751d5bcb --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_code_write.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_model_parameters_write import LlmAsJudgeModelParametersWrite +import typing +from .llm_as_judge_message_write import LlmAsJudgeMessageWrite +import typing_extensions +from .llm_as_judge_output_schema_write import LlmAsJudgeOutputSchemaWrite +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class LlmAsJudgeCodeWrite(UniversalBaseModel): + model: LlmAsJudgeModelParametersWrite + messages: typing.List[LlmAsJudgeMessageWrite] + variables: typing.Dict[str, str] + schema_: typing_extensions.Annotated[ + typing.List[LlmAsJudgeOutputSchemaWrite], FieldMetadata(alias="schema") + ] + + 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/llm_as_judge_message.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_message.py new file mode 100644 index 0000000000..2b53df52df --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_message.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_message_role import LlmAsJudgeMessageRole +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeMessage(UniversalBaseModel): + role: LlmAsJudgeMessageRole + content: str + + 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/llm_as_judge_message_public.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_public.py new file mode 100644 index 0000000000..e5adc25a3f --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_public.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_message_public_role import LlmAsJudgeMessagePublicRole +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeMessagePublic(UniversalBaseModel): + role: LlmAsJudgeMessagePublicRole + content: str + + 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/llm_as_judge_message_public_role.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_public_role.py new file mode 100644 index 0000000000..3ee6449c69 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_public_role.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmAsJudgeMessagePublicRole = typing.Union[ + typing.Literal["SYSTEM", "USER", "AI", "TOOL_EXECUTION_RESULT"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/llm_as_judge_message_role.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_role.py new file mode 100644 index 0000000000..0cbe1d3370 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_role.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmAsJudgeMessageRole = typing.Union[ + typing.Literal["SYSTEM", "USER", "AI", "TOOL_EXECUTION_RESULT"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/llm_as_judge_message_write.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_write.py new file mode 100644 index 0000000000..d8b06584f9 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_write.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_message_write_role import LlmAsJudgeMessageWriteRole +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeMessageWrite(UniversalBaseModel): + role: LlmAsJudgeMessageWriteRole + content: str + + 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/llm_as_judge_message_write_role.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_write_role.py new file mode 100644 index 0000000000..bd47cc3adf --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_message_write_role.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmAsJudgeMessageWriteRole = typing.Union[ + typing.Literal["SYSTEM", "USER", "AI", "TOOL_EXECUTION_RESULT"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters.py new file mode 100644 index 0000000000..54bce2bbec --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeModelParameters(UniversalBaseModel): + name: str + temperature: float + + 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/llm_as_judge_model_parameters_public.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters_public.py new file mode 100644 index 0000000000..003b9a5523 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters_public.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeModelParametersPublic(UniversalBaseModel): + name: str + temperature: float + + 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/llm_as_judge_model_parameters_write.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters_write.py new file mode 100644 index 0000000000..09494302ec --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_model_parameters_write.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeModelParametersWrite(UniversalBaseModel): + name: str + temperature: float + + 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/llm_as_judge_output_schema.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema.py new file mode 100644 index 0000000000..9e89ae4af8 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_output_schema_type import LlmAsJudgeOutputSchemaType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeOutputSchema(UniversalBaseModel): + name: str + type: LlmAsJudgeOutputSchemaType + description: str + + 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/llm_as_judge_output_schema_public.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_public.py new file mode 100644 index 0000000000..472eea5746 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_public.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_output_schema_public_type import LlmAsJudgeOutputSchemaPublicType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeOutputSchemaPublic(UniversalBaseModel): + name: str + type: LlmAsJudgeOutputSchemaPublicType + description: str + + 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/llm_as_judge_output_schema_public_type.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_public_type.py new file mode 100644 index 0000000000..6f37d864b9 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_public_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmAsJudgeOutputSchemaPublicType = typing.Union[ + typing.Literal["BOOLEAN", "INTEGER", "DOUBLE"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_type.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_type.py new file mode 100644 index 0000000000..7031c174e3 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmAsJudgeOutputSchemaType = typing.Union[ + typing.Literal["BOOLEAN", "INTEGER", "DOUBLE"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_write.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_write.py new file mode 100644 index 0000000000..9dc26750ea --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_write.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .llm_as_judge_output_schema_write_type import LlmAsJudgeOutputSchemaWriteType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LlmAsJudgeOutputSchemaWrite(UniversalBaseModel): + name: str + type: LlmAsJudgeOutputSchemaWriteType + description: str + + 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/llm_as_judge_output_schema_write_type.py b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_write_type.py new file mode 100644 index 0000000000..a819e1e181 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/llm_as_judge_output_schema_write_type.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LlmAsJudgeOutputSchemaWriteType = typing.Union[ + typing.Literal["BOOLEAN", "INTEGER", "DOUBLE"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/percentage_values.py b/sdks/python/src/opik/rest_api/types/percentage_values.py new file mode 100644 index 0000000000..cd5d231297 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/percentage_values.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing_extensions +import typing +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class PercentageValues(UniversalBaseModel): + p_50: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="p50") + ] = None + p_90: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="p90") + ] = None + p_99: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="p99") + ] = 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/project.py b/sdks/python/src/opik/rest_api/types/project.py index 885c599e3d..8dfc928b96 100644 --- a/sdks/python/src/opik/rest_api/types/project.py +++ b/sdks/python/src/opik/rest_api/types/project.py @@ -3,6 +3,8 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing import datetime as dt +from .feedback_score_average import FeedbackScoreAverage +from .percentage_values import PercentageValues from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic @@ -16,6 +18,10 @@ class Project(UniversalBaseModel): last_updated_at: typing.Optional[dt.datetime] = None last_updated_by: typing.Optional[str] = None last_updated_trace_at: typing.Optional[dt.datetime] = None + feedback_scores: typing.Optional[typing.List[FeedbackScoreAverage]] = None + duration: typing.Optional[PercentageValues] = None + total_estimated_cost: typing.Optional[float] = None + usage: typing.Optional[typing.Dict[str, float]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/sdks/python/src/opik/rest_api/types/project_public.py b/sdks/python/src/opik/rest_api/types/project_public.py index f96ac0c9e4..ad852552f5 100644 --- a/sdks/python/src/opik/rest_api/types/project_public.py +++ b/sdks/python/src/opik/rest_api/types/project_public.py @@ -3,6 +3,8 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing import datetime as dt +from .feedback_score_average_public import FeedbackScoreAveragePublic +from .percentage_values_public import PercentageValuesPublic from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic @@ -16,6 +18,10 @@ class ProjectPublic(UniversalBaseModel): last_updated_at: typing.Optional[dt.datetime] = None last_updated_by: typing.Optional[str] = None last_updated_trace_at: typing.Optional[dt.datetime] = None + feedback_scores: typing.Optional[typing.List[FeedbackScoreAveragePublic]] = None + duration: typing.Optional[PercentageValuesPublic] = None + total_estimated_cost: typing.Optional[float] = None + usage: typing.Optional[typing.Dict[str, float]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( 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 index 1d4c9029a8..12c6e39e64 100644 --- a/sdks/python/src/opik/rest_api/types/provider_api_key.py +++ b/sdks/python/src/opik/rest_api/types/provider_api_key.py @@ -2,6 +2,7 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing +from .provider_api_key_provider import ProviderApiKeyProvider import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic @@ -9,8 +10,9 @@ class ProviderApiKey(UniversalBaseModel): id: typing.Optional[str] = None - provider: typing.Literal["openai"] = "openai" + provider: ProviderApiKeyProvider api_key: str + name: typing.Optional[str] = None created_at: typing.Optional[dt.datetime] = None created_by: typing.Optional[str] = None last_updated_at: typing.Optional[dt.datetime] = None diff --git a/sdks/python/src/opik/rest_api/types/provider_api_key_provider.py b/sdks/python/src/opik/rest_api/types/provider_api_key_provider.py new file mode 100644 index 0000000000..09c3c37a46 --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/provider_api_key_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderApiKeyProvider = typing.Union[typing.Literal["openai", "anthropic"], typing.Any] 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 index 4cae95867f..b5124abe53 100644 --- 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 @@ -2,6 +2,7 @@ from ..core.pydantic_utilities import UniversalBaseModel import typing +from .provider_api_key_public_provider import ProviderApiKeyPublicProvider import datetime as dt from ..core.pydantic_utilities import IS_PYDANTIC_V2 import pydantic @@ -9,7 +10,9 @@ class ProviderApiKeyPublic(UniversalBaseModel): id: typing.Optional[str] = None - provider: typing.Literal["openai"] = "openai" + provider: ProviderApiKeyPublicProvider + api_key: str + name: typing.Optional[str] = None created_at: typing.Optional[dt.datetime] = None created_by: typing.Optional[str] = None last_updated_at: typing.Optional[dt.datetime] = None diff --git a/sdks/python/src/opik/rest_api/types/provider_api_key_public_provider.py b/sdks/python/src/opik/rest_api/types/provider_api_key_public_provider.py new file mode 100644 index 0000000000..8e955c7cbd --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/provider_api_key_public_provider.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ProviderApiKeyPublicProvider = typing.Union[ + typing.Literal["openai", "anthropic"], typing.Any +] diff --git a/sdks/python/src/opik/rest_api/types/score_name.py b/sdks/python/src/opik/rest_api/types/score_name.py new file mode 100644 index 0000000000..cefed423ed --- /dev/null +++ b/sdks/python/src/opik/rest_api/types/score_name.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 ScoreName(UniversalBaseModel): + name: 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/span.py b/sdks/python/src/opik/rest_api/types/span.py index d0b5b8d16b..b6d0ff446a 100644 --- a/sdks/python/src/opik/rest_api/types/span.py +++ b/sdks/python/src/opik/rest_api/types/span.py @@ -39,6 +39,7 @@ class Span(UniversalBaseModel): last_updated_by: typing.Optional[str] = None feedback_scores: typing.Optional[typing.List[FeedbackScore]] = None total_estimated_cost: typing.Optional[float] = None + total_estimated_cost_version: typing.Optional[str] = None duration: typing.Optional[float] = pydantic.Field(default=None) """ Duration in milliseconds as a decimal number to support sub-millisecond precision diff --git a/sdks/python/src/opik/rest_api/types/span_public.py b/sdks/python/src/opik/rest_api/types/span_public.py index d8b7f7247f..961f531a52 100644 --- a/sdks/python/src/opik/rest_api/types/span_public.py +++ b/sdks/python/src/opik/rest_api/types/span_public.py @@ -34,6 +34,7 @@ class SpanPublic(UniversalBaseModel): last_updated_by: typing.Optional[str] = None feedback_scores: typing.Optional[typing.List[FeedbackScorePublic]] = None total_estimated_cost: typing.Optional[float] = None + total_estimated_cost_version: typing.Optional[str] = None duration: typing.Optional[float] = pydantic.Field(default=None) """ Duration in milliseconds as a decimal number to support sub-millisecond precision diff --git a/sdks/python/src/opik/rest_api/types/span_write.py b/sdks/python/src/opik/rest_api/types/span_write.py index f72c3ddd66..61b3338935 100644 --- a/sdks/python/src/opik/rest_api/types/span_write.py +++ b/sdks/python/src/opik/rest_api/types/span_write.py @@ -31,6 +31,8 @@ class SpanWrite(UniversalBaseModel): tags: typing.Optional[typing.List[str]] = None usage: typing.Optional[typing.Dict[str, int]] = None error_info: typing.Optional[ErrorInfoWrite] = None + total_estimated_cost: typing.Optional[float] = None + total_estimated_cost_version: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/sdks/typescript/src/opik/rest_api/Client.ts b/sdks/typescript/src/opik/rest_api/Client.ts index 828bac3017..9e333a6457 100644 --- a/sdks/typescript/src/opik/rest_api/Client.ts +++ b/sdks/typescript/src/opik/rest_api/Client.ts @@ -8,6 +8,7 @@ import urlJoin from "url-join"; import * as errors from "./errors/index"; import { SystemUsage } from "./api/resources/systemUsage/client/Client"; import { Check } from "./api/resources/check/client/Client"; +import { AutomationRuleEvaluators } from "./api/resources/automationRuleEvaluators/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"; @@ -186,6 +187,12 @@ export class OpikApiClient { return (this._check ??= new Check(this._options)); } + protected _automationRuleEvaluators: AutomationRuleEvaluators | undefined; + + public get automationRuleEvaluators(): AutomationRuleEvaluators { + return (this._automationRuleEvaluators ??= new AutomationRuleEvaluators(this._options)); + } + protected _chatCompletions: ChatCompletions | undefined; public get chatCompletions(): ChatCompletions { diff --git a/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/Client.ts b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/Client.ts new file mode 100644 index 0000000000..bacf6c2d10 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/Client.ts @@ -0,0 +1,477 @@ +/** + * 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"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace AutomationRuleEvaluators { + interface Options { + environment?: core.Supplier; + /** Override the Authorization header */ + apiKey?: core.Supplier; + /** Override the Comet-Workspace header */ + workspaceName?: 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; + /** Override the Authorization header */ + apiKey?: string | undefined; + /** Override the Comet-Workspace header */ + workspaceName?: string | undefined; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +/** + * Automation rule evaluators resource + */ +export class AutomationRuleEvaluators { + constructor(protected readonly _options: AutomationRuleEvaluators.Options = {}) {} + + /** + * Find project Evaluators + * + * @param {string} projectId + * @param {OpikApi.FindEvaluatorsRequest} request + * @param {AutomationRuleEvaluators.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.automationRuleEvaluators.findEvaluators("projectId") + */ + public findEvaluators( + projectId: string, + request: OpikApi.FindEvaluatorsRequest = {}, + requestOptions?: AutomationRuleEvaluators.RequestOptions + ): core.APIPromise { + return core.APIPromise.from( + (async () => { + const { name, page, size } = request; + const _queryParams: Record = {}; + if (name != null) { + _queryParams["name"] = name; + } + if (page != null) { + _queryParams["page"] = page.toString(); + } + if (size != null) { + _queryParams["size"] = size.toString(); + } + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.OpikApiEnvironment.Default, + `v1/private/automations/projects/${encodeURIComponent(projectId)}/evaluators` + ), + method: "GET", + headers: { + "Comet-Workspace": + (await core.Supplier.get(this._options.workspaceName)) != null + ? await core.Supplier.get(this._options.workspaceName) + : undefined, + "X-Fern-Language": "JavaScript", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: + requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + withCredentials: true, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: serializers.AutomationRuleEvaluatorPagePublic.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/automations/projects/{projectId}/evaluators." + ); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + })() + ); + } + + /** + * Create automation rule evaluator + * + * @param {string} projectId + * @param {OpikApi.AutomationRuleEvaluatorWrite} request + * @param {AutomationRuleEvaluators.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.automationRuleEvaluators.createAutomationRuleEvaluator("projectId", { + * type: "llm_as_judge" + * }) + */ + public createAutomationRuleEvaluator( + projectId: string, + request: OpikApi.AutomationRuleEvaluatorWrite, + requestOptions?: AutomationRuleEvaluators.RequestOptions + ): core.APIPromise { + return core.APIPromise.from( + (async () => { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.OpikApiEnvironment.Default, + `v1/private/automations/projects/${encodeURIComponent(projectId)}/evaluators` + ), + method: "POST", + headers: { + "Comet-Workspace": + (await core.Supplier.get(this._options.workspaceName)) != null + ? await core.Supplier.get(this._options.workspaceName) + : undefined, + "X-Fern-Language": "JavaScript", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.AutomationRuleEvaluatorWrite.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: + requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + withCredentials: true, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: undefined, + 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 POST /v1/private/automations/projects/{projectId}/evaluators." + ); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + })() + ); + } + + /** + * Delete automation rule evaluators batch + * + * @param {string} projectId + * @param {OpikApi.BatchDelete} request + * @param {AutomationRuleEvaluators.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.automationRuleEvaluators.deleteAutomationRuleEvaluatorBatch("projectId", { + * ids: ["ids"] + * }) + */ + public deleteAutomationRuleEvaluatorBatch( + projectId: string, + request: OpikApi.BatchDelete, + requestOptions?: AutomationRuleEvaluators.RequestOptions + ): core.APIPromise { + return core.APIPromise.from( + (async () => { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.OpikApiEnvironment.Default, + `v1/private/automations/projects/${encodeURIComponent(projectId)}/evaluators/delete` + ), + method: "POST", + headers: { + "Comet-Workspace": + (await core.Supplier.get(this._options.workspaceName)) != null + ? await core.Supplier.get(this._options.workspaceName) + : undefined, + "X-Fern-Language": "JavaScript", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.BatchDelete.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: + requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + withCredentials: true, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: undefined, + 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 POST /v1/private/automations/projects/{projectId}/evaluators/delete." + ); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + })() + ); + } + + /** + * Get automation rule by id + * + * @param {string} projectId + * @param {string} id + * @param {AutomationRuleEvaluators.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.automationRuleEvaluators.getEvaluatorById("projectId", "id") + */ + public getEvaluatorById( + projectId: string, + id: string, + requestOptions?: AutomationRuleEvaluators.RequestOptions + ): core.APIPromise { + return core.APIPromise.from( + (async () => { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.OpikApiEnvironment.Default, + `v1/private/automations/projects/${encodeURIComponent( + projectId + )}/evaluators/${encodeURIComponent(id)}` + ), + method: "GET", + headers: { + "Comet-Workspace": + (await core.Supplier.get(this._options.workspaceName)) != null + ? await core.Supplier.get(this._options.workspaceName) + : undefined, + "X-Fern-Language": "JavaScript", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: + requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + withCredentials: true, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: serializers.AutomationRuleEvaluatorPublic.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/automations/projects/{projectId}/evaluators/{id}." + ); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + })() + ); + } + + /** + * update Automation Rule Evaluator by id + * + * @param {string} id + * @param {string} projectId + * @param {OpikApi.AutomationRuleEvaluatorUpdate} request + * @param {AutomationRuleEvaluators.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.automationRuleEvaluators.updateAutomationRuleEvaluator("id", "projectId", { + * name: "name", + * code: { + * model: { + * name: "name", + * temperature: 1.1 + * }, + * messages: [{ + * role: "SYSTEM", + * content: "content" + * }], + * variables: { + * "key": "value" + * }, + * schema: [{ + * name: "name", + * type: "BOOLEAN", + * description: "description" + * }] + * }, + * samplingRate: 1.1 + * }) + */ + public updateAutomationRuleEvaluator( + id: string, + projectId: string, + request: OpikApi.AutomationRuleEvaluatorUpdate, + requestOptions?: AutomationRuleEvaluators.RequestOptions + ): core.APIPromise { + return core.APIPromise.from( + (async () => { + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.OpikApiEnvironment.Default, + `v1/private/automations/projects/${encodeURIComponent( + projectId + )}/evaluators/${encodeURIComponent(id)}` + ), + method: "PATCH", + headers: { + "Comet-Workspace": + (await core.Supplier.get(this._options.workspaceName)) != null + ? await core.Supplier.get(this._options.workspaceName) + : undefined, + "X-Fern-Language": "JavaScript", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.AutomationRuleEvaluatorUpdate.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: + requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + withCredentials: true, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: undefined, + 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 PATCH /v1/private/automations/projects/{projectId}/evaluators/{id}." + ); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + })() + ); + } + + protected async _getCustomAuthorizationHeaders() { + const apiKeyValue = await core.Supplier.get(this._options.apiKey); + return { Authorization: apiKeyValue }; + } +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/index.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/AutomationRuleEvaluatorUpdate.ts b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/AutomationRuleEvaluatorUpdate.ts new file mode 100644 index 0000000000..e09e3c3b52 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/AutomationRuleEvaluatorUpdate.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../../../../index"; + +/** + * @example + * { + * name: "name", + * code: { + * model: { + * name: "name", + * temperature: 1.1 + * }, + * messages: [{ + * role: "SYSTEM", + * content: "content" + * }], + * variables: { + * "key": "value" + * }, + * schema: [{ + * name: "name", + * type: "BOOLEAN", + * description: "description" + * }] + * }, + * samplingRate: 1.1 + * } + */ +export interface AutomationRuleEvaluatorUpdate { + name: string; + code: OpikApi.LlmAsJudgeCode; + samplingRate: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/FindEvaluatorsRequest.ts b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/FindEvaluatorsRequest.ts new file mode 100644 index 0000000000..e2085fd920 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/FindEvaluatorsRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface FindEvaluatorsRequest { + name?: string; + page?: number; + size?: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/index.ts new file mode 100644 index 0000000000..73a8ed21f9 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type FindEvaluatorsRequest } from "./FindEvaluatorsRequest"; +export { type AutomationRuleEvaluatorUpdate } from "./AutomationRuleEvaluatorUpdate"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/index.ts new file mode 100644 index 0000000000..5ec76921e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/automationRuleEvaluators/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.ts b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.ts index 46c4305c9b..ec112ee3fc 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/Client.ts @@ -221,7 +221,10 @@ export class Datasets { * @example * await client.datasets.createOrUpdateDatasetItems({ * items: [{ - * source: "manual" + * source: "manual", + * data: { + * "key": "value" + * } * }] * }) */ diff --git a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemBatchWrite.ts b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemBatchWrite.ts index a66d90f987..5826f2a135 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemBatchWrite.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemBatchWrite.ts @@ -8,7 +8,10 @@ import * as OpikApi from "../../../../index"; * @example * { * items: [{ - * source: "manual" + * source: "manual", + * data: { + * "key": "value" + * } * }] * } */ diff --git a/sdks/typescript/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemStreamRequest.ts b/sdks/typescript/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemStreamRequest.ts index ac530f0f4c..a4ae077c6c 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemStreamRequest.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemStreamRequest.ts @@ -6,4 +6,6 @@ export interface ExperimentItemStreamRequest { experimentName: string; limit?: number; lastRetrievedId?: string; + /** Truncate image included in either input, output or metadata */ + truncate?: boolean; } diff --git a/sdks/typescript/src/opik/rest_api/api/resources/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/index.ts index 5730f9e41b..6d56a8cc40 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/index.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/index.ts @@ -1,17 +1,20 @@ export * as feedbackDefinitions from "./feedbackDefinitions"; export * from "./feedbackDefinitions/types"; +export * as llmProviderKey from "./llmProviderKey"; +export * from "./llmProviderKey/types"; export * as projects from "./projects"; export * from "./projects/types"; export * as spans from "./spans"; export * from "./spans/types"; export * as systemUsage from "./systemUsage"; export * as check from "./check"; +export * as automationRuleEvaluators from "./automationRuleEvaluators"; 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 "./automationRuleEvaluators/client/requests"; export * from "./chatCompletions/client/requests"; export * from "./datasets/client/requests"; export * from "./experiments/client/requests"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.ts index 2b432991bb..3ac39bb276 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/Client.ts @@ -201,6 +201,7 @@ export class LlmProviderKey { * * @example * await client.llmProviderKey.storeLlmProviderApiKey({ + * provider: "openai", * apiKey: "api_key" * }) */ @@ -229,10 +230,7 @@ export class LlmProviderKey { }, contentType: "application/json", requestType: "json", - body: { - ...serializers.ProviderApiKeyWrite.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - provider: "openai", - }, + body: serializers.ProviderApiKeyWrite.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts index 0c3725e234..2410b03a13 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts @@ -10,4 +10,5 @@ */ export interface ProviderApiKeyUpdate { apiKey: string; + name?: string; } diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts index 154ecb7cfb..5db933924f 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts @@ -2,12 +2,17 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as OpikApi from "../../../../index"; + /** * @example * { + * provider: "openai", * apiKey: "api_key" * } */ export interface ProviderApiKeyWrite { + provider: OpikApi.ProviderApiKeyWriteProvider; apiKey: string; + name?: string; } diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.ts index 5ec76921e1..c9240f83b4 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/index.ts @@ -1 +1,2 @@ +export * from "./types"; export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/types/ProviderApiKeyWriteProvider.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/types/ProviderApiKeyWriteProvider.ts new file mode 100644 index 0000000000..f023c2a281 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/types/ProviderApiKeyWriteProvider.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ProviderApiKeyWriteProvider = "openai" | "anthropic"; + +export const ProviderApiKeyWriteProvider = { + Openai: "openai", + Anthropic: "anthropic", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/types/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/types/index.ts new file mode 100644 index 0000000000..afa593e58d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/llmProviderKey/types/index.ts @@ -0,0 +1 @@ +export * from "./ProviderApiKeyWriteProvider"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/projects/client/Client.ts b/sdks/typescript/src/opik/rest_api/api/resources/projects/client/Client.ts index d7dfe4bbad..eb9edaa29e 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/projects/client/Client.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/projects/client/Client.ts @@ -528,6 +528,89 @@ export class Projects { ); } + /** + * Find Feedback Score names By Project Ids + * + * @param {OpikApi.FindFeedbackScoreNamesByProjectIdsRequest} request + * @param {Projects.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.projects.findFeedbackScoreNamesByProjectIds() + */ + public findFeedbackScoreNamesByProjectIds( + request: OpikApi.FindFeedbackScoreNamesByProjectIdsRequest = {}, + requestOptions?: Projects.RequestOptions + ): core.APIPromise { + return core.APIPromise.from( + (async () => { + const { projectIds } = request; + const _queryParams: Record = {}; + if (projectIds != null) { + _queryParams["project_ids"] = projectIds; + } + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.OpikApiEnvironment.Default, + "v1/private/projects/feedback-scores/names" + ), + method: "GET", + headers: { + "Comet-Workspace": + (await core.Supplier.get(this._options.workspaceName)) != null + ? await core.Supplier.get(this._options.workspaceName) + : undefined, + "X-Fern-Language": "JavaScript", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: + requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + withCredentials: true, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + ok: _response.ok, + body: serializers.FeedbackScoreNames.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/projects/feedback-scores/names." + ); + case "unknown": + throw new errors.OpikApiError({ + message: _response.error.errorMessage, + }); + } + })() + ); + } + /** * Gets specified metrics for a project * diff --git a/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/FindFeedbackScoreNamesByProjectIdsRequest.ts b/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/FindFeedbackScoreNamesByProjectIdsRequest.ts new file mode 100644 index 0000000000..5556d74d0a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/FindFeedbackScoreNamesByProjectIdsRequest.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface FindFeedbackScoreNamesByProjectIdsRequest { + projectIds?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/index.ts b/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/index.ts index d974748846..a64da4f5d9 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/index.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/projects/client/requests/index.ts @@ -1,5 +1,6 @@ export { type FindProjectsRequest } from "./FindProjectsRequest"; export { type ProjectWrite } from "./ProjectWrite"; export { type ProjectUpdate } from "./ProjectUpdate"; +export { type FindFeedbackScoreNamesByProjectIdsRequest } from "./FindFeedbackScoreNamesByProjectIdsRequest"; export { type ProjectMetricRequestPublic } from "./ProjectMetricRequestPublic"; export { type ProjectRetrievePublic } from "./ProjectRetrievePublic"; diff --git a/sdks/typescript/src/opik/rest_api/api/resources/spans/client/requests/SpanUpdate.ts b/sdks/typescript/src/opik/rest_api/api/resources/spans/client/requests/SpanUpdate.ts index 266ef6eaef..77db3663f5 100644 --- a/sdks/typescript/src/opik/rest_api/api/resources/spans/client/requests/SpanUpdate.ts +++ b/sdks/typescript/src/opik/rest_api/api/resources/spans/client/requests/SpanUpdate.ts @@ -25,5 +25,6 @@ export interface SpanUpdate { provider?: string; tags?: string[]; usage?: Record; + totalEstimatedCost?: number; errorInfo?: OpikApi.ErrorInfo; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluator.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluator.ts new file mode 100644 index 0000000000..718141eb4a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluator.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export type AutomationRuleEvaluator = OpikApi.AutomationRuleEvaluator.LlmAsJudge; + +export declare namespace AutomationRuleEvaluator { + interface LlmAsJudge extends OpikApi.AutomationRuleEvaluatorLlmAsJudge, _Base { + type: "llm_as_judge"; + } + + interface _Base { + id?: string; + projectId?: string; + name: string; + samplingRate?: number; + createdAt?: Date; + createdBy?: string; + lastUpdatedAt?: Date; + lastUpdatedBy?: string; + action?: "evaluator"; + } +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudge.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudge.ts new file mode 100644 index 0000000000..d4ef20cfa8 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudge.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface AutomationRuleEvaluatorLlmAsJudge { + code?: OpikApi.LlmAsJudgeCode; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudgePublic.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudgePublic.ts new file mode 100644 index 0000000000..9a8c761c91 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudgePublic.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface AutomationRuleEvaluatorLlmAsJudgePublic { + code?: OpikApi.LlmAsJudgeCodePublic; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudgeWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudgeWrite.ts new file mode 100644 index 0000000000..17a65960ce --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorLlmAsJudgeWrite.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface AutomationRuleEvaluatorLlmAsJudgeWrite { + code?: OpikApi.LlmAsJudgeCodeWrite; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorObjectPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorObjectPublic.ts new file mode 100644 index 0000000000..6b3c7dd411 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorObjectPublic.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export type AutomationRuleEvaluatorObjectPublic = OpikApi.AutomationRuleEvaluatorObjectPublic.LlmAsJudge; + +export declare namespace AutomationRuleEvaluatorObjectPublic { + interface LlmAsJudge extends OpikApi.AutomationRuleEvaluatorLlmAsJudgePublic, _Base { + type: "llm_as_judge"; + } + + interface _Base { + id?: string; + projectId?: string; + name: string; + samplingRate?: number; + createdAt?: Date; + createdBy?: string; + lastUpdatedAt?: Date; + lastUpdatedBy?: string; + action?: "evaluator"; + } +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorPagePublic.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorPagePublic.ts new file mode 100644 index 0000000000..3741018eee --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorPagePublic.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface AutomationRuleEvaluatorPagePublic { + page?: number; + size?: number; + total?: number; + content?: OpikApi.AutomationRuleEvaluatorObjectPublic[]; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorPublic.ts new file mode 100644 index 0000000000..862d1d832f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorPublic.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export type AutomationRuleEvaluatorPublic = OpikApi.AutomationRuleEvaluatorPublic.LlmAsJudge; + +export declare namespace AutomationRuleEvaluatorPublic { + interface LlmAsJudge extends OpikApi.AutomationRuleEvaluatorLlmAsJudgePublic, _Base { + type: "llm_as_judge"; + } + + interface _Base { + id?: string; + projectId?: string; + name: string; + samplingRate?: number; + createdAt?: Date; + createdBy?: string; + lastUpdatedAt?: Date; + lastUpdatedBy?: string; + action?: "evaluator"; + } +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorWrite.ts new file mode 100644 index 0000000000..408773efc2 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/AutomationRuleEvaluatorWrite.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export type AutomationRuleEvaluatorWrite = OpikApi.AutomationRuleEvaluatorWrite.LlmAsJudge; + +export declare namespace AutomationRuleEvaluatorWrite { + interface LlmAsJudge extends OpikApi.AutomationRuleEvaluatorLlmAsJudgeWrite, _Base { + type: "llm_as_judge"; + } + + interface _Base { + name: string; + samplingRate?: number; + action?: "evaluator"; + } +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/DatasetItem.ts b/sdks/typescript/src/opik/rest_api/api/types/DatasetItem.ts index dd6bf9aaa7..f7c8c53713 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/DatasetItem.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/DatasetItem.ts @@ -6,13 +6,10 @@ import * as OpikApi from "../index"; export interface DatasetItem { id?: string; - input?: OpikApi.JsonNode; - expectedOutput?: OpikApi.JsonNode; - metadata?: OpikApi.JsonNode; traceId?: string; spanId?: string; source: OpikApi.DatasetItemSource; - data?: OpikApi.JsonNode; + data: OpikApi.JsonNode; experimentItems?: OpikApi.ExperimentItem[]; createdAt?: Date; lastUpdatedAt?: Date; diff --git a/sdks/typescript/src/opik/rest_api/api/types/DatasetItemCompare.ts b/sdks/typescript/src/opik/rest_api/api/types/DatasetItemCompare.ts index c84f4969d4..949daab85e 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/DatasetItemCompare.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/DatasetItemCompare.ts @@ -6,13 +6,10 @@ import * as OpikApi from "../index"; export interface DatasetItemCompare { id?: string; - input?: OpikApi.JsonNodeCompare; - expectedOutput?: OpikApi.JsonNodeCompare; - metadata?: OpikApi.JsonNodeCompare; traceId?: string; spanId?: string; source: OpikApi.DatasetItemCompareSource; - data?: OpikApi.JsonNode; + data: OpikApi.JsonNode; experimentItems?: OpikApi.ExperimentItemCompare[]; createdAt?: Date; lastUpdatedAt?: Date; diff --git a/sdks/typescript/src/opik/rest_api/api/types/DatasetItemPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/DatasetItemPublic.ts index e7751f6575..1a734a961b 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/DatasetItemPublic.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/DatasetItemPublic.ts @@ -6,13 +6,10 @@ import * as OpikApi from "../index"; export interface DatasetItemPublic { id?: string; - input?: OpikApi.JsonNodePublic; - expectedOutput?: OpikApi.JsonNodePublic; - metadata?: OpikApi.JsonNodePublic; traceId?: string; spanId?: string; source: OpikApi.DatasetItemPublicSource; - data?: OpikApi.JsonNode; + data: OpikApi.JsonNode; experimentItems?: OpikApi.ExperimentItemPublic[]; createdAt?: Date; lastUpdatedAt?: Date; diff --git a/sdks/typescript/src/opik/rest_api/api/types/DatasetItemWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/DatasetItemWrite.ts index 512ddbc33a..130d2d2aae 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/DatasetItemWrite.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/DatasetItemWrite.ts @@ -6,11 +6,8 @@ import * as OpikApi from "../index"; export interface DatasetItemWrite { id?: string; - input?: OpikApi.JsonNodeWrite; - expectedOutput?: OpikApi.JsonNodeWrite; - metadata?: OpikApi.JsonNodeWrite; traceId?: string; spanId?: string; source: OpikApi.DatasetItemWriteSource; - data?: OpikApi.JsonNode; + data: OpikApi.JsonNode; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/FeedbackScoreNames.ts b/sdks/typescript/src/opik/rest_api/api/types/FeedbackScoreNames.ts new file mode 100644 index 0000000000..6187a78ada --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/FeedbackScoreNames.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface FeedbackScoreNames { + scores?: OpikApi.ScoreName[]; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCode.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCode.ts new file mode 100644 index 0000000000..b072bcd222 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCode.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeCode { + model: OpikApi.LlmAsJudgeModelParameters; + messages: OpikApi.LlmAsJudgeMessage[]; + variables: Record; + schema: OpikApi.LlmAsJudgeOutputSchema[]; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCodePublic.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCodePublic.ts new file mode 100644 index 0000000000..cacf70ab05 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCodePublic.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeCodePublic { + model: OpikApi.LlmAsJudgeModelParametersPublic; + messages: OpikApi.LlmAsJudgeMessagePublic[]; + variables: Record; + schema: OpikApi.LlmAsJudgeOutputSchemaPublic[]; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCodeWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCodeWrite.ts new file mode 100644 index 0000000000..0a78cd79b8 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeCodeWrite.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeCodeWrite { + model: OpikApi.LlmAsJudgeModelParametersWrite; + messages: OpikApi.LlmAsJudgeMessageWrite[]; + variables: Record; + schema: OpikApi.LlmAsJudgeOutputSchemaWrite[]; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessage.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessage.ts new file mode 100644 index 0000000000..f5c84d293d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessage.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeMessage { + role: OpikApi.LlmAsJudgeMessageRole; + content: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessagePublic.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessagePublic.ts new file mode 100644 index 0000000000..0159bc4c82 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessagePublic.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeMessagePublic { + role: OpikApi.LlmAsJudgeMessagePublicRole; + content: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessagePublicRole.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessagePublicRole.ts new file mode 100644 index 0000000000..e43b4d56cd --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessagePublicRole.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LlmAsJudgeMessagePublicRole = "SYSTEM" | "USER" | "AI" | "TOOL_EXECUTION_RESULT"; + +export const LlmAsJudgeMessagePublicRole = { + System: "SYSTEM", + User: "USER", + Ai: "AI", + ToolExecutionResult: "TOOL_EXECUTION_RESULT", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageRole.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageRole.ts new file mode 100644 index 0000000000..0690249ddf --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageRole.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LlmAsJudgeMessageRole = "SYSTEM" | "USER" | "AI" | "TOOL_EXECUTION_RESULT"; + +export const LlmAsJudgeMessageRole = { + System: "SYSTEM", + User: "USER", + Ai: "AI", + ToolExecutionResult: "TOOL_EXECUTION_RESULT", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageWrite.ts new file mode 100644 index 0000000000..4ce4d9ce74 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageWrite.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeMessageWrite { + role: OpikApi.LlmAsJudgeMessageWriteRole; + content: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageWriteRole.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageWriteRole.ts new file mode 100644 index 0000000000..cd59803ac4 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeMessageWriteRole.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LlmAsJudgeMessageWriteRole = "SYSTEM" | "USER" | "AI" | "TOOL_EXECUTION_RESULT"; + +export const LlmAsJudgeMessageWriteRole = { + System: "SYSTEM", + User: "USER", + Ai: "AI", + ToolExecutionResult: "TOOL_EXECUTION_RESULT", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParameters.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParameters.ts new file mode 100644 index 0000000000..1e82b7cf0e --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParameters.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LlmAsJudgeModelParameters { + name: string; + temperature: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParametersPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParametersPublic.ts new file mode 100644 index 0000000000..1c7a914f0c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParametersPublic.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LlmAsJudgeModelParametersPublic { + name: string; + temperature: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParametersWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParametersWrite.ts new file mode 100644 index 0000000000..052cee335a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeModelParametersWrite.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LlmAsJudgeModelParametersWrite { + name: string; + temperature: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchema.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchema.ts new file mode 100644 index 0000000000..e5d2c48d90 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchema.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeOutputSchema { + name: string; + type: OpikApi.LlmAsJudgeOutputSchemaType; + description: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaPublic.ts new file mode 100644 index 0000000000..93705f06e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaPublic.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeOutputSchemaPublic { + name: string; + type: OpikApi.LlmAsJudgeOutputSchemaPublicType; + description: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaPublicType.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaPublicType.ts new file mode 100644 index 0000000000..62ea58efd1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaPublicType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LlmAsJudgeOutputSchemaPublicType = "BOOLEAN" | "INTEGER" | "DOUBLE"; + +export const LlmAsJudgeOutputSchemaPublicType = { + Boolean: "BOOLEAN", + Integer: "INTEGER", + Double: "DOUBLE", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaType.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaType.ts new file mode 100644 index 0000000000..98c5ffe482 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LlmAsJudgeOutputSchemaType = "BOOLEAN" | "INTEGER" | "DOUBLE"; + +export const LlmAsJudgeOutputSchemaType = { + Boolean: "BOOLEAN", + Integer: "INTEGER", + Double: "DOUBLE", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaWrite.ts new file mode 100644 index 0000000000..f147883b7c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaWrite.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as OpikApi from "../index"; + +export interface LlmAsJudgeOutputSchemaWrite { + name: string; + type: OpikApi.LlmAsJudgeOutputSchemaWriteType; + description: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaWriteType.ts b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaWriteType.ts new file mode 100644 index 0000000000..1aed06a307 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/LlmAsJudgeOutputSchemaWriteType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LlmAsJudgeOutputSchemaWriteType = "BOOLEAN" | "INTEGER" | "DOUBLE"; + +export const LlmAsJudgeOutputSchemaWriteType = { + Boolean: "BOOLEAN", + Integer: "INTEGER", + Double: "DOUBLE", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/PercentageValues.ts b/sdks/typescript/src/opik/rest_api/api/types/PercentageValues.ts new file mode 100644 index 0000000000..b5813d9d1b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/PercentageValues.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface PercentageValues { + p50?: number; + p90?: number; + p99?: number; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Project.ts b/sdks/typescript/src/opik/rest_api/api/types/Project.ts index c9152baa78..3ccb3f9321 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/Project.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/Project.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as OpikApi from "../index"; + export interface Project { id?: string; name: string; @@ -11,4 +13,8 @@ export interface Project { lastUpdatedAt?: Date; lastUpdatedBy?: string; lastUpdatedTraceAt?: Date; + feedbackScores?: OpikApi.FeedbackScoreAverage[]; + duration?: OpikApi.PercentageValues; + totalEstimatedCost?: number; + usage?: Record; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProjectPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/ProjectPublic.ts index 8aeefb8594..e91af3ba9a 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/ProjectPublic.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/ProjectPublic.ts @@ -2,6 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as OpikApi from "../index"; + export interface ProjectPublic { id?: string; name: string; @@ -11,4 +13,8 @@ export interface ProjectPublic { lastUpdatedAt?: Date; lastUpdatedBy?: string; lastUpdatedTraceAt?: Date; + feedbackScores?: OpikApi.FeedbackScoreAveragePublic[]; + duration?: OpikApi.PercentageValuesPublic; + totalEstimatedCost?: number; + usage?: Record; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.ts b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.ts index 8530bd0d7d..f1c56b0d38 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKey.ts @@ -2,10 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as OpikApi from "../index"; + export interface ProviderApiKey { id?: string; - provider: "openai"; + provider: OpikApi.ProviderApiKeyProvider; apiKey: string; + name?: string; createdAt?: Date; createdBy?: string; lastUpdatedAt?: Date; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyProvider.ts b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyProvider.ts new file mode 100644 index 0000000000..57fa1d05d2 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyProvider.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ProviderApiKeyProvider = "openai" | "anthropic"; + +export const ProviderApiKeyProvider = { + Openai: "openai", + Anthropic: "anthropic", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.ts index 17b1b0b92f..876b584637 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublic.ts @@ -2,9 +2,13 @@ * This file was auto-generated by Fern from our API Definition. */ +import * as OpikApi from "../index"; + export interface ProviderApiKeyPublic { id?: string; - provider: "openai"; + provider: OpikApi.ProviderApiKeyPublicProvider; + apiKey: string; + name?: string; createdAt?: Date; createdBy?: string; lastUpdatedAt?: Date; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublicProvider.ts b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublicProvider.ts new file mode 100644 index 0000000000..2589de6cab --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ProviderApiKeyPublicProvider.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ProviderApiKeyPublicProvider = "openai" | "anthropic"; + +export const ProviderApiKeyPublicProvider = { + Openai: "openai", + Anthropic: "anthropic", +} as const; diff --git a/sdks/typescript/src/opik/rest_api/api/types/ScoreName.ts b/sdks/typescript/src/opik/rest_api/api/types/ScoreName.ts new file mode 100644 index 0000000000..637f9b5c08 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/api/types/ScoreName.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ScoreName { + name?: string; +} diff --git a/sdks/typescript/src/opik/rest_api/api/types/Span.ts b/sdks/typescript/src/opik/rest_api/api/types/Span.ts index 8ef8919951..d5c535dd90 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/Span.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/Span.ts @@ -29,6 +29,7 @@ export interface Span { lastUpdatedBy?: string; feedbackScores?: OpikApi.FeedbackScore[]; totalEstimatedCost?: number; + totalEstimatedCostVersion?: string; /** Duration in milliseconds as a decimal number to support sub-millisecond precision */ duration?: number; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/SpanPublic.ts b/sdks/typescript/src/opik/rest_api/api/types/SpanPublic.ts index 03bde38e85..d6cad4bfeb 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/SpanPublic.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/SpanPublic.ts @@ -27,6 +27,7 @@ export interface SpanPublic { lastUpdatedBy?: string; feedbackScores?: OpikApi.FeedbackScorePublic[]; totalEstimatedCost?: number; + totalEstimatedCostVersion?: string; /** Duration in milliseconds as a decimal number to support sub-millisecond precision */ duration?: number; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/SpanWrite.ts b/sdks/typescript/src/opik/rest_api/api/types/SpanWrite.ts index f5fcea857c..18d3650f2d 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/SpanWrite.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/SpanWrite.ts @@ -22,4 +22,6 @@ export interface SpanWrite { tags?: string[]; usage?: Record; errorInfo?: OpikApi.ErrorInfoWrite; + totalEstimatedCost?: number; + totalEstimatedCostVersion?: string; } diff --git a/sdks/typescript/src/opik/rest_api/api/types/index.ts b/sdks/typescript/src/opik/rest_api/api/types/index.ts index f1930bf300..515a2bb7c4 100644 --- a/sdks/typescript/src/opik/rest_api/api/types/index.ts +++ b/sdks/typescript/src/opik/rest_api/api/types/index.ts @@ -4,6 +4,33 @@ export * from "./TraceCountResponse"; export * from "./WorkspaceTraceCount"; export * from "./ErrorMessage"; export * from "./AuthDetailsHolder"; +export * from "./AutomationRuleEvaluator"; +export * from "./AutomationRuleEvaluatorLlmAsJudge"; +export * from "./LlmAsJudgeCode"; +export * from "./LlmAsJudgeMessageRole"; +export * from "./LlmAsJudgeMessage"; +export * from "./LlmAsJudgeModelParameters"; +export * from "./LlmAsJudgeOutputSchemaType"; +export * from "./LlmAsJudgeOutputSchema"; +export * from "./AutomationRuleEvaluatorLlmAsJudgeWrite"; +export * from "./AutomationRuleEvaluatorWrite"; +export * from "./LlmAsJudgeCodeWrite"; +export * from "./LlmAsJudgeMessageWriteRole"; +export * from "./LlmAsJudgeMessageWrite"; +export * from "./LlmAsJudgeModelParametersWrite"; +export * from "./LlmAsJudgeOutputSchemaWriteType"; +export * from "./LlmAsJudgeOutputSchemaWrite"; +export * from "./BatchDelete"; +export * from "./AutomationRuleEvaluatorLlmAsJudgePublic"; +export * from "./AutomationRuleEvaluatorObjectPublic"; +export * from "./AutomationRuleEvaluatorPagePublic"; +export * from "./LlmAsJudgeCodePublic"; +export * from "./LlmAsJudgeMessagePublicRole"; +export * from "./LlmAsJudgeMessagePublic"; +export * from "./LlmAsJudgeModelParametersPublic"; +export * from "./LlmAsJudgeOutputSchemaPublicType"; +export * from "./LlmAsJudgeOutputSchemaPublic"; +export * from "./AutomationRuleEvaluatorPublic"; export * from "./AssistantMessageRole"; export * from "./AssistantMessage"; export * from "./ChatCompletionChoice"; @@ -33,8 +60,6 @@ export * from "./FeedbackScore"; export * from "./JsonNode"; export * from "./DatasetItemWriteSource"; export * from "./DatasetItemWrite"; -export * from "./JsonNodeWrite"; -export * from "./BatchDelete"; export * from "./ColumnCompareTypesItem"; export * from "./ColumnCompare"; export * from "./DatasetItemPageCompare"; @@ -49,7 +74,6 @@ export * from "./DatasetPublic"; export * from "./DatasetItemPublicSource"; export * from "./DatasetItemPublic"; export * from "./ExperimentItemPublic"; -export * from "./JsonNodePublic"; export * from "./ColumnPublicTypesItem"; export * from "./ColumnPublic"; export * from "./DatasetItemPagePublic"; @@ -61,10 +85,12 @@ export * from "./ChunkedOutputJsonNode"; export * from "./Experiment"; export * from "./FeedbackScoreAverage"; export * from "./PromptVersionLink"; +export * from "./JsonNodeWrite"; export * from "./PromptVersionLinkWrite"; export * from "./ExperimentPagePublic"; export * from "./ExperimentPublic"; export * from "./FeedbackScoreAveragePublic"; +export * from "./JsonNodePublic"; export * from "./PromptVersionLinkPublic"; export * from "./ErrorMessagePublic"; export * from "./CategoricalFeedbackDefinition"; @@ -90,10 +116,16 @@ export * from "./FeedbackUpdate"; export * from "./NumericalFeedbackDefinitionUpdate"; export * from "./NumericalFeedbackDetailUpdate"; export * from "./ProjectPagePublic"; +export * from "./ProviderApiKeyPublicProvider"; export * from "./ProviderApiKeyPublic"; +export * from "./ProviderApiKeyProvider"; export * from "./ProviderApiKey"; +export * from "./PercentageValues"; export * from "./Project"; +export * from "./PercentageValuesPublic"; export * from "./ProjectPublic"; +export * from "./FeedbackScoreNames"; +export * from "./ScoreName"; export * from "./DataPointNumberPublic"; export * from "./ProjectMetricResponsePublicMetricType"; export * from "./ProjectMetricResponsePublicInterval"; @@ -126,7 +158,6 @@ export * from "./SpanPagePublic"; export * from "./AvgValueStatPublic"; export * from "./CountValueStatPublic"; export * from "./PercentageValueStatPublic"; -export * from "./PercentageValuesPublic"; export * from "./ProjectStatItemObjectPublic"; export * from "./ProjectStatsPublic"; export * from "./FeedbackScoreBatch"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/index.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/index.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/requests/AutomationRuleEvaluatorUpdate.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/requests/AutomationRuleEvaluatorUpdate.ts new file mode 100644 index 0000000000..bd366fd26c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/requests/AutomationRuleEvaluatorUpdate.ts @@ -0,0 +1,25 @@ +/** + * 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 { LlmAsJudgeCode } from "../../../../types/LlmAsJudgeCode"; + +export const AutomationRuleEvaluatorUpdate: core.serialization.Schema< + serializers.AutomationRuleEvaluatorUpdate.Raw, + OpikApi.AutomationRuleEvaluatorUpdate +> = core.serialization.object({ + name: core.serialization.string(), + code: LlmAsJudgeCode, + samplingRate: core.serialization.property("sampling_rate", core.serialization.number()), +}); + +export declare namespace AutomationRuleEvaluatorUpdate { + interface Raw { + name: string; + code: LlmAsJudgeCode.Raw; + sampling_rate: number; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/requests/index.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/requests/index.ts new file mode 100644 index 0000000000..0be075521f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/client/requests/index.ts @@ -0,0 +1 @@ +export { AutomationRuleEvaluatorUpdate } from "./AutomationRuleEvaluatorUpdate"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/index.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/index.ts new file mode 100644 index 0000000000..5ec76921e1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/automationRuleEvaluators/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemStreamRequest.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemStreamRequest.ts index f45283242b..4a3f6f2355 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemStreamRequest.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemStreamRequest.ts @@ -13,6 +13,7 @@ export const ExperimentItemStreamRequest: core.serialization.Schema< experimentName: core.serialization.property("experiment_name", core.serialization.string()), limit: core.serialization.number().optional(), lastRetrievedId: core.serialization.property("last_retrieved_id", core.serialization.string().optional()), + truncate: core.serialization.boolean().optional(), }); export declare namespace ExperimentItemStreamRequest { @@ -20,5 +21,6 @@ export declare namespace ExperimentItemStreamRequest { experiment_name: string; limit?: number | null; last_retrieved_id?: string | null; + truncate?: boolean | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/index.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/index.ts index 5af908e5db..702545972a 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/index.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/index.ts @@ -1,17 +1,20 @@ export * as feedbackDefinitions from "./feedbackDefinitions"; export * from "./feedbackDefinitions/types"; +export * as llmProviderKey from "./llmProviderKey"; +export * from "./llmProviderKey/types"; export * as projects from "./projects"; export * from "./projects/types"; export * as spans from "./spans"; export * from "./spans/types"; export * as experiments from "./experiments"; export * as traces from "./traces"; +export * as automationRuleEvaluators from "./automationRuleEvaluators"; +export * from "./automationRuleEvaluators/client/requests"; 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"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts index 7b5d2e54a8..fc1a3b2845 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts @@ -11,10 +11,12 @@ export const ProviderApiKeyUpdate: core.serialization.Schema< OpikApi.ProviderApiKeyUpdate > = core.serialization.object({ apiKey: core.serialization.property("api_key", core.serialization.string()), + name: core.serialization.string().optional(), }); export declare namespace ProviderApiKeyUpdate { interface Raw { api_key: string; + name?: string | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts index a9bb321804..d869519334 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts @@ -5,16 +5,21 @@ import * as serializers from "../../../../index"; import * as OpikApi from "../../../../../api/index"; import * as core from "../../../../../core"; +import { ProviderApiKeyWriteProvider } from "../../types/ProviderApiKeyWriteProvider"; export const ProviderApiKeyWrite: core.serialization.Schema< serializers.ProviderApiKeyWrite.Raw, OpikApi.ProviderApiKeyWrite > = core.serialization.object({ + provider: ProviderApiKeyWriteProvider, apiKey: core.serialization.property("api_key", core.serialization.string()), + name: core.serialization.string().optional(), }); export declare namespace ProviderApiKeyWrite { interface Raw { + provider: ProviderApiKeyWriteProvider.Raw; api_key: string; + name?: string | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.ts index 5ec76921e1..c9240f83b4 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/index.ts @@ -1 +1,2 @@ +export * from "./types"; export * from "./client"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/types/ProviderApiKeyWriteProvider.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/types/ProviderApiKeyWriteProvider.ts new file mode 100644 index 0000000000..6f3ba116e2 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/types/ProviderApiKeyWriteProvider.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"; + +export const ProviderApiKeyWriteProvider: core.serialization.Schema< + serializers.ProviderApiKeyWriteProvider.Raw, + OpikApi.ProviderApiKeyWriteProvider +> = core.serialization.enum_(["openai", "anthropic"]); + +export declare namespace ProviderApiKeyWriteProvider { + type Raw = "openai" | "anthropic"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/types/index.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/types/index.ts new file mode 100644 index 0000000000..afa593e58d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/llmProviderKey/types/index.ts @@ -0,0 +1 @@ +export * from "./ProviderApiKeyWriteProvider"; diff --git a/sdks/typescript/src/opik/rest_api/serialization/resources/spans/client/requests/SpanUpdate.ts b/sdks/typescript/src/opik/rest_api/serialization/resources/spans/client/requests/SpanUpdate.ts index 6eab677e35..e1d6e3a299 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/resources/spans/client/requests/SpanUpdate.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/resources/spans/client/requests/SpanUpdate.ts @@ -22,6 +22,7 @@ export const SpanUpdate: core.serialization.Schema | null; + total_estimated_cost?: number | null; error_info?: ErrorInfo.Raw | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluator.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluator.ts new file mode 100644 index 0000000000..b9c967607a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluator.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as core from "../../core"; +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import { AutomationRuleEvaluatorLlmAsJudge } from "./AutomationRuleEvaluatorLlmAsJudge"; + +const _Base = core.serialization.object({ + id: core.serialization.string().optional(), + projectId: core.serialization.string().optional(), + name: core.serialization.string(), + samplingRate: core.serialization.number().optional(), + createdAt: core.serialization.date().optional(), + createdBy: core.serialization.string().optional(), + lastUpdatedAt: core.serialization.date().optional(), + lastUpdatedBy: core.serialization.string().optional(), + action: core.serialization.stringLiteral("evaluator").optional(), +}); +export const AutomationRuleEvaluator: core.serialization.Schema< + serializers.AutomationRuleEvaluator.Raw, + OpikApi.AutomationRuleEvaluator +> = core.serialization + .union("type", { + llm_as_judge: AutomationRuleEvaluatorLlmAsJudge.extend(_Base), + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace AutomationRuleEvaluator { + type Raw = AutomationRuleEvaluator.LlmAsJudge; + + interface LlmAsJudge extends _Base, AutomationRuleEvaluatorLlmAsJudge.Raw { + type: "llm_as_judge"; + } + + interface _Base { + id?: string | null; + projectId?: string | null; + name: string; + samplingRate?: number | null; + createdAt?: string | null; + createdBy?: string | null; + lastUpdatedAt?: string | null; + lastUpdatedBy?: string | null; + action?: "evaluator" | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudge.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudge.ts new file mode 100644 index 0000000000..758da77ebb --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudge.ts @@ -0,0 +1,21 @@ +/** + * 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 { LlmAsJudgeCode } from "./LlmAsJudgeCode"; + +export const AutomationRuleEvaluatorLlmAsJudge: core.serialization.ObjectSchema< + serializers.AutomationRuleEvaluatorLlmAsJudge.Raw, + OpikApi.AutomationRuleEvaluatorLlmAsJudge +> = core.serialization.object({ + code: LlmAsJudgeCode.optional(), +}); + +export declare namespace AutomationRuleEvaluatorLlmAsJudge { + interface Raw { + code?: LlmAsJudgeCode.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudgePublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudgePublic.ts new file mode 100644 index 0000000000..811e145a07 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudgePublic.ts @@ -0,0 +1,21 @@ +/** + * 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 { LlmAsJudgeCodePublic } from "./LlmAsJudgeCodePublic"; + +export const AutomationRuleEvaluatorLlmAsJudgePublic: core.serialization.ObjectSchema< + serializers.AutomationRuleEvaluatorLlmAsJudgePublic.Raw, + OpikApi.AutomationRuleEvaluatorLlmAsJudgePublic +> = core.serialization.object({ + code: LlmAsJudgeCodePublic.optional(), +}); + +export declare namespace AutomationRuleEvaluatorLlmAsJudgePublic { + interface Raw { + code?: LlmAsJudgeCodePublic.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudgeWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudgeWrite.ts new file mode 100644 index 0000000000..a93ef575c1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorLlmAsJudgeWrite.ts @@ -0,0 +1,21 @@ +/** + * 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 { LlmAsJudgeCodeWrite } from "./LlmAsJudgeCodeWrite"; + +export const AutomationRuleEvaluatorLlmAsJudgeWrite: core.serialization.ObjectSchema< + serializers.AutomationRuleEvaluatorLlmAsJudgeWrite.Raw, + OpikApi.AutomationRuleEvaluatorLlmAsJudgeWrite +> = core.serialization.object({ + code: LlmAsJudgeCodeWrite.optional(), +}); + +export declare namespace AutomationRuleEvaluatorLlmAsJudgeWrite { + interface Raw { + code?: LlmAsJudgeCodeWrite.Raw | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorObjectPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorObjectPublic.ts new file mode 100644 index 0000000000..978e41a189 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorObjectPublic.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as core from "../../core"; +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import { AutomationRuleEvaluatorLlmAsJudgePublic } from "./AutomationRuleEvaluatorLlmAsJudgePublic"; + +const _Base = core.serialization.object({ + id: core.serialization.string().optional(), + projectId: core.serialization.string().optional(), + name: core.serialization.string(), + samplingRate: core.serialization.number().optional(), + createdAt: core.serialization.date().optional(), + createdBy: core.serialization.string().optional(), + lastUpdatedAt: core.serialization.date().optional(), + lastUpdatedBy: core.serialization.string().optional(), + action: core.serialization.stringLiteral("evaluator").optional(), +}); +export const AutomationRuleEvaluatorObjectPublic: core.serialization.Schema< + serializers.AutomationRuleEvaluatorObjectPublic.Raw, + OpikApi.AutomationRuleEvaluatorObjectPublic +> = core.serialization + .union("type", { + llm_as_judge: AutomationRuleEvaluatorLlmAsJudgePublic.extend(_Base), + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace AutomationRuleEvaluatorObjectPublic { + type Raw = AutomationRuleEvaluatorObjectPublic.LlmAsJudge; + + interface LlmAsJudge extends _Base, AutomationRuleEvaluatorLlmAsJudgePublic.Raw { + type: "llm_as_judge"; + } + + interface _Base { + id?: string | null; + projectId?: string | null; + name: string; + samplingRate?: number | null; + createdAt?: string | null; + createdBy?: string | null; + lastUpdatedAt?: string | null; + lastUpdatedBy?: string | null; + action?: "evaluator" | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorPagePublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorPagePublic.ts new file mode 100644 index 0000000000..c1df904f4c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorPagePublic.ts @@ -0,0 +1,27 @@ +/** + * 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 { AutomationRuleEvaluatorObjectPublic } from "./AutomationRuleEvaluatorObjectPublic"; + +export const AutomationRuleEvaluatorPagePublic: core.serialization.ObjectSchema< + serializers.AutomationRuleEvaluatorPagePublic.Raw, + OpikApi.AutomationRuleEvaluatorPagePublic +> = core.serialization.object({ + page: core.serialization.number().optional(), + size: core.serialization.number().optional(), + total: core.serialization.number().optional(), + content: core.serialization.list(AutomationRuleEvaluatorObjectPublic).optional(), +}); + +export declare namespace AutomationRuleEvaluatorPagePublic { + interface Raw { + page?: number | null; + size?: number | null; + total?: number | null; + content?: AutomationRuleEvaluatorObjectPublic.Raw[] | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorPublic.ts new file mode 100644 index 0000000000..d55f79c0e2 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorPublic.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as core from "../../core"; +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import { AutomationRuleEvaluatorLlmAsJudgePublic } from "./AutomationRuleEvaluatorLlmAsJudgePublic"; + +const _Base = core.serialization.object({ + id: core.serialization.string().optional(), + projectId: core.serialization.string().optional(), + name: core.serialization.string(), + samplingRate: core.serialization.number().optional(), + createdAt: core.serialization.date().optional(), + createdBy: core.serialization.string().optional(), + lastUpdatedAt: core.serialization.date().optional(), + lastUpdatedBy: core.serialization.string().optional(), + action: core.serialization.stringLiteral("evaluator").optional(), +}); +export const AutomationRuleEvaluatorPublic: core.serialization.Schema< + serializers.AutomationRuleEvaluatorPublic.Raw, + OpikApi.AutomationRuleEvaluatorPublic +> = core.serialization + .union("type", { + llm_as_judge: AutomationRuleEvaluatorLlmAsJudgePublic.extend(_Base), + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace AutomationRuleEvaluatorPublic { + type Raw = AutomationRuleEvaluatorPublic.LlmAsJudge; + + interface LlmAsJudge extends _Base, AutomationRuleEvaluatorLlmAsJudgePublic.Raw { + type: "llm_as_judge"; + } + + interface _Base { + id?: string | null; + projectId?: string | null; + name: string; + samplingRate?: number | null; + createdAt?: string | null; + createdBy?: string | null; + lastUpdatedAt?: string | null; + lastUpdatedBy?: string | null; + action?: "evaluator" | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorWrite.ts new file mode 100644 index 0000000000..839b4692e8 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/AutomationRuleEvaluatorWrite.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as core from "../../core"; +import * as serializers from "../index"; +import * as OpikApi from "../../api/index"; +import { AutomationRuleEvaluatorLlmAsJudgeWrite } from "./AutomationRuleEvaluatorLlmAsJudgeWrite"; + +const _Base = core.serialization.object({ + name: core.serialization.string(), + samplingRate: core.serialization.number().optional(), + action: core.serialization.stringLiteral("evaluator").optional(), +}); +export const AutomationRuleEvaluatorWrite: core.serialization.Schema< + serializers.AutomationRuleEvaluatorWrite.Raw, + OpikApi.AutomationRuleEvaluatorWrite +> = core.serialization + .union("type", { + llm_as_judge: AutomationRuleEvaluatorLlmAsJudgeWrite.extend(_Base), + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace AutomationRuleEvaluatorWrite { + type Raw = AutomationRuleEvaluatorWrite.LlmAsJudge; + + interface LlmAsJudge extends _Base, AutomationRuleEvaluatorLlmAsJudgeWrite.Raw { + type: "llm_as_judge"; + } + + interface _Base { + name: string; + samplingRate?: number | null; + action?: "evaluator" | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItem.ts b/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItem.ts index cba4eeaa77..e383c8eda8 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItem.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItem.ts @@ -5,20 +5,17 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; -import { JsonNode } from "./JsonNode"; import { DatasetItemSource } from "./DatasetItemSource"; +import { JsonNode } from "./JsonNode"; import { ExperimentItem } from "./ExperimentItem"; export const DatasetItem: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - input: JsonNode.optional(), - expectedOutput: core.serialization.property("expected_output", JsonNode.optional()), - metadata: JsonNode.optional(), traceId: core.serialization.property("trace_id", core.serialization.string().optional()), spanId: core.serialization.property("span_id", core.serialization.string().optional()), source: DatasetItemSource, - data: JsonNode.optional(), + data: JsonNode, experimentItems: core.serialization.property( "experiment_items", core.serialization.list(ExperimentItem).optional() @@ -32,13 +29,10 @@ export const DatasetItem: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - input: JsonNodeCompare.optional(), - expectedOutput: core.serialization.property("expected_output", JsonNodeCompare.optional()), - metadata: JsonNodeCompare.optional(), traceId: core.serialization.property("trace_id", core.serialization.string().optional()), spanId: core.serialization.property("span_id", core.serialization.string().optional()), source: DatasetItemCompareSource, - data: JsonNode.optional(), + data: JsonNode, experimentItems: core.serialization.property( "experiment_items", core.serialization.list(ExperimentItemCompare).optional() @@ -35,13 +31,10 @@ export const DatasetItemCompare: core.serialization.ObjectSchema< export declare namespace DatasetItemCompare { interface Raw { id?: string | null; - input?: JsonNodeCompare.Raw | null; - expected_output?: JsonNodeCompare.Raw | null; - metadata?: JsonNodeCompare.Raw | null; trace_id?: string | null; span_id?: string | null; source: DatasetItemCompareSource.Raw; - data?: JsonNode.Raw | null; + data: JsonNode.Raw; experiment_items?: ExperimentItemCompare.Raw[] | null; created_at?: string | null; last_updated_at?: string | null; diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemPublic.ts index 469fe95ea7..7b00969c21 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemPublic.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemPublic.ts @@ -5,7 +5,6 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; -import { JsonNodePublic } from "./JsonNodePublic"; import { DatasetItemPublicSource } from "./DatasetItemPublicSource"; import { JsonNode } from "./JsonNode"; import { ExperimentItemPublic } from "./ExperimentItemPublic"; @@ -15,13 +14,10 @@ export const DatasetItemPublic: core.serialization.ObjectSchema< OpikApi.DatasetItemPublic > = core.serialization.object({ id: core.serialization.string().optional(), - input: JsonNodePublic.optional(), - expectedOutput: core.serialization.property("expected_output", JsonNodePublic.optional()), - metadata: JsonNodePublic.optional(), traceId: core.serialization.property("trace_id", core.serialization.string().optional()), spanId: core.serialization.property("span_id", core.serialization.string().optional()), source: DatasetItemPublicSource, - data: JsonNode.optional(), + data: JsonNode, experimentItems: core.serialization.property( "experiment_items", core.serialization.list(ExperimentItemPublic).optional() @@ -35,13 +31,10 @@ export const DatasetItemPublic: core.serialization.ObjectSchema< export declare namespace DatasetItemPublic { interface Raw { id?: string | null; - input?: JsonNodePublic.Raw | null; - expected_output?: JsonNodePublic.Raw | null; - metadata?: JsonNodePublic.Raw | null; trace_id?: string | null; span_id?: string | null; source: DatasetItemPublicSource.Raw; - data?: JsonNode.Raw | null; + data: JsonNode.Raw; experiment_items?: ExperimentItemPublic.Raw[] | null; created_at?: string | null; last_updated_at?: string | null; diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemWrite.ts index 9432bdc76f..ac4d26acbf 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemWrite.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/DatasetItemWrite.ts @@ -5,7 +5,6 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; -import { JsonNodeWrite } from "./JsonNodeWrite"; import { DatasetItemWriteSource } from "./DatasetItemWriteSource"; import { JsonNode } from "./JsonNode"; @@ -14,24 +13,18 @@ export const DatasetItemWrite: core.serialization.ObjectSchema< OpikApi.DatasetItemWrite > = core.serialization.object({ id: core.serialization.string().optional(), - input: JsonNodeWrite.optional(), - expectedOutput: core.serialization.property("expected_output", JsonNodeWrite.optional()), - metadata: JsonNodeWrite.optional(), traceId: core.serialization.property("trace_id", core.serialization.string().optional()), spanId: core.serialization.property("span_id", core.serialization.string().optional()), source: DatasetItemWriteSource, - data: JsonNode.optional(), + data: JsonNode, }); export declare namespace DatasetItemWrite { interface Raw { id?: string | null; - input?: JsonNodeWrite.Raw | null; - expected_output?: JsonNodeWrite.Raw | null; - metadata?: JsonNodeWrite.Raw | null; trace_id?: string | null; span_id?: string | null; source: DatasetItemWriteSource.Raw; - data?: JsonNode.Raw | null; + data: JsonNode.Raw; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/FeedbackScoreNames.ts b/sdks/typescript/src/opik/rest_api/serialization/types/FeedbackScoreNames.ts new file mode 100644 index 0000000000..a1e6223c9f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/FeedbackScoreNames.ts @@ -0,0 +1,21 @@ +/** + * 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 { ScoreName } from "./ScoreName"; + +export const FeedbackScoreNames: core.serialization.ObjectSchema< + serializers.FeedbackScoreNames.Raw, + OpikApi.FeedbackScoreNames +> = core.serialization.object({ + scores: core.serialization.list(ScoreName).optional(), +}); + +export declare namespace FeedbackScoreNames { + interface Raw { + scores?: ScoreName.Raw[] | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCode.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCode.ts new file mode 100644 index 0000000000..daef3c018e --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCode.ts @@ -0,0 +1,27 @@ +/** + * 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 { LlmAsJudgeModelParameters } from "./LlmAsJudgeModelParameters"; +import { LlmAsJudgeMessage } from "./LlmAsJudgeMessage"; +import { LlmAsJudgeOutputSchema } from "./LlmAsJudgeOutputSchema"; + +export const LlmAsJudgeCode: core.serialization.ObjectSchema = + core.serialization.object({ + model: LlmAsJudgeModelParameters, + messages: core.serialization.list(LlmAsJudgeMessage), + variables: core.serialization.record(core.serialization.string(), core.serialization.string()), + schema: core.serialization.list(LlmAsJudgeOutputSchema), + }); + +export declare namespace LlmAsJudgeCode { + interface Raw { + model: LlmAsJudgeModelParameters.Raw; + messages: LlmAsJudgeMessage.Raw[]; + variables: Record; + schema: LlmAsJudgeOutputSchema.Raw[]; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCodePublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCodePublic.ts new file mode 100644 index 0000000000..fe5e2c55e0 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCodePublic.ts @@ -0,0 +1,29 @@ +/** + * 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 { LlmAsJudgeModelParametersPublic } from "./LlmAsJudgeModelParametersPublic"; +import { LlmAsJudgeMessagePublic } from "./LlmAsJudgeMessagePublic"; +import { LlmAsJudgeOutputSchemaPublic } from "./LlmAsJudgeOutputSchemaPublic"; + +export const LlmAsJudgeCodePublic: core.serialization.ObjectSchema< + serializers.LlmAsJudgeCodePublic.Raw, + OpikApi.LlmAsJudgeCodePublic +> = core.serialization.object({ + model: LlmAsJudgeModelParametersPublic, + messages: core.serialization.list(LlmAsJudgeMessagePublic), + variables: core.serialization.record(core.serialization.string(), core.serialization.string()), + schema: core.serialization.list(LlmAsJudgeOutputSchemaPublic), +}); + +export declare namespace LlmAsJudgeCodePublic { + interface Raw { + model: LlmAsJudgeModelParametersPublic.Raw; + messages: LlmAsJudgeMessagePublic.Raw[]; + variables: Record; + schema: LlmAsJudgeOutputSchemaPublic.Raw[]; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCodeWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCodeWrite.ts new file mode 100644 index 0000000000..8f2652034f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeCodeWrite.ts @@ -0,0 +1,29 @@ +/** + * 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 { LlmAsJudgeModelParametersWrite } from "./LlmAsJudgeModelParametersWrite"; +import { LlmAsJudgeMessageWrite } from "./LlmAsJudgeMessageWrite"; +import { LlmAsJudgeOutputSchemaWrite } from "./LlmAsJudgeOutputSchemaWrite"; + +export const LlmAsJudgeCodeWrite: core.serialization.ObjectSchema< + serializers.LlmAsJudgeCodeWrite.Raw, + OpikApi.LlmAsJudgeCodeWrite +> = core.serialization.object({ + model: LlmAsJudgeModelParametersWrite, + messages: core.serialization.list(LlmAsJudgeMessageWrite), + variables: core.serialization.record(core.serialization.string(), core.serialization.string()), + schema: core.serialization.list(LlmAsJudgeOutputSchemaWrite), +}); + +export declare namespace LlmAsJudgeCodeWrite { + interface Raw { + model: LlmAsJudgeModelParametersWrite.Raw; + messages: LlmAsJudgeMessageWrite.Raw[]; + variables: Record; + schema: LlmAsJudgeOutputSchemaWrite.Raw[]; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessage.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessage.ts new file mode 100644 index 0000000000..726cbbeec1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessage.ts @@ -0,0 +1,23 @@ +/** + * 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 { LlmAsJudgeMessageRole } from "./LlmAsJudgeMessageRole"; + +export const LlmAsJudgeMessage: core.serialization.ObjectSchema< + serializers.LlmAsJudgeMessage.Raw, + OpikApi.LlmAsJudgeMessage +> = core.serialization.object({ + role: LlmAsJudgeMessageRole, + content: core.serialization.string(), +}); + +export declare namespace LlmAsJudgeMessage { + interface Raw { + role: LlmAsJudgeMessageRole.Raw; + content: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessagePublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessagePublic.ts new file mode 100644 index 0000000000..033f6f8710 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessagePublic.ts @@ -0,0 +1,23 @@ +/** + * 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 { LlmAsJudgeMessagePublicRole } from "./LlmAsJudgeMessagePublicRole"; + +export const LlmAsJudgeMessagePublic: core.serialization.ObjectSchema< + serializers.LlmAsJudgeMessagePublic.Raw, + OpikApi.LlmAsJudgeMessagePublic +> = core.serialization.object({ + role: LlmAsJudgeMessagePublicRole, + content: core.serialization.string(), +}); + +export declare namespace LlmAsJudgeMessagePublic { + interface Raw { + role: LlmAsJudgeMessagePublicRole.Raw; + content: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessagePublicRole.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessagePublicRole.ts new file mode 100644 index 0000000000..907fc7e93f --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessagePublicRole.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"; + +export const LlmAsJudgeMessagePublicRole: core.serialization.Schema< + serializers.LlmAsJudgeMessagePublicRole.Raw, + OpikApi.LlmAsJudgeMessagePublicRole +> = core.serialization.enum_(["SYSTEM", "USER", "AI", "TOOL_EXECUTION_RESULT"]); + +export declare namespace LlmAsJudgeMessagePublicRole { + type Raw = "SYSTEM" | "USER" | "AI" | "TOOL_EXECUTION_RESULT"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageRole.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageRole.ts new file mode 100644 index 0000000000..8b1c19e570 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageRole.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"; + +export const LlmAsJudgeMessageRole: core.serialization.Schema< + serializers.LlmAsJudgeMessageRole.Raw, + OpikApi.LlmAsJudgeMessageRole +> = core.serialization.enum_(["SYSTEM", "USER", "AI", "TOOL_EXECUTION_RESULT"]); + +export declare namespace LlmAsJudgeMessageRole { + type Raw = "SYSTEM" | "USER" | "AI" | "TOOL_EXECUTION_RESULT"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageWrite.ts new file mode 100644 index 0000000000..60ff79388d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageWrite.ts @@ -0,0 +1,23 @@ +/** + * 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 { LlmAsJudgeMessageWriteRole } from "./LlmAsJudgeMessageWriteRole"; + +export const LlmAsJudgeMessageWrite: core.serialization.ObjectSchema< + serializers.LlmAsJudgeMessageWrite.Raw, + OpikApi.LlmAsJudgeMessageWrite +> = core.serialization.object({ + role: LlmAsJudgeMessageWriteRole, + content: core.serialization.string(), +}); + +export declare namespace LlmAsJudgeMessageWrite { + interface Raw { + role: LlmAsJudgeMessageWriteRole.Raw; + content: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageWriteRole.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageWriteRole.ts new file mode 100644 index 0000000000..2bf28c2c03 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeMessageWriteRole.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"; + +export const LlmAsJudgeMessageWriteRole: core.serialization.Schema< + serializers.LlmAsJudgeMessageWriteRole.Raw, + OpikApi.LlmAsJudgeMessageWriteRole +> = core.serialization.enum_(["SYSTEM", "USER", "AI", "TOOL_EXECUTION_RESULT"]); + +export declare namespace LlmAsJudgeMessageWriteRole { + type Raw = "SYSTEM" | "USER" | "AI" | "TOOL_EXECUTION_RESULT"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParameters.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParameters.ts new file mode 100644 index 0000000000..49484484d1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParameters.ts @@ -0,0 +1,22 @@ +/** + * 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 const LlmAsJudgeModelParameters: core.serialization.ObjectSchema< + serializers.LlmAsJudgeModelParameters.Raw, + OpikApi.LlmAsJudgeModelParameters +> = core.serialization.object({ + name: core.serialization.string(), + temperature: core.serialization.number(), +}); + +export declare namespace LlmAsJudgeModelParameters { + interface Raw { + name: string; + temperature: number; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParametersPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParametersPublic.ts new file mode 100644 index 0000000000..22335c698d --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParametersPublic.ts @@ -0,0 +1,22 @@ +/** + * 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 const LlmAsJudgeModelParametersPublic: core.serialization.ObjectSchema< + serializers.LlmAsJudgeModelParametersPublic.Raw, + OpikApi.LlmAsJudgeModelParametersPublic +> = core.serialization.object({ + name: core.serialization.string(), + temperature: core.serialization.number(), +}); + +export declare namespace LlmAsJudgeModelParametersPublic { + interface Raw { + name: string; + temperature: number; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParametersWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParametersWrite.ts new file mode 100644 index 0000000000..cdcae4215c --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeModelParametersWrite.ts @@ -0,0 +1,22 @@ +/** + * 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 const LlmAsJudgeModelParametersWrite: core.serialization.ObjectSchema< + serializers.LlmAsJudgeModelParametersWrite.Raw, + OpikApi.LlmAsJudgeModelParametersWrite +> = core.serialization.object({ + name: core.serialization.string(), + temperature: core.serialization.number(), +}); + +export declare namespace LlmAsJudgeModelParametersWrite { + interface Raw { + name: string; + temperature: number; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchema.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchema.ts new file mode 100644 index 0000000000..e9428816fd --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchema.ts @@ -0,0 +1,25 @@ +/** + * 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 { LlmAsJudgeOutputSchemaType } from "./LlmAsJudgeOutputSchemaType"; + +export const LlmAsJudgeOutputSchema: core.serialization.ObjectSchema< + serializers.LlmAsJudgeOutputSchema.Raw, + OpikApi.LlmAsJudgeOutputSchema +> = core.serialization.object({ + name: core.serialization.string(), + type: LlmAsJudgeOutputSchemaType, + description: core.serialization.string(), +}); + +export declare namespace LlmAsJudgeOutputSchema { + interface Raw { + name: string; + type: LlmAsJudgeOutputSchemaType.Raw; + description: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaPublic.ts new file mode 100644 index 0000000000..36f8215339 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaPublic.ts @@ -0,0 +1,25 @@ +/** + * 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 { LlmAsJudgeOutputSchemaPublicType } from "./LlmAsJudgeOutputSchemaPublicType"; + +export const LlmAsJudgeOutputSchemaPublic: core.serialization.ObjectSchema< + serializers.LlmAsJudgeOutputSchemaPublic.Raw, + OpikApi.LlmAsJudgeOutputSchemaPublic +> = core.serialization.object({ + name: core.serialization.string(), + type: LlmAsJudgeOutputSchemaPublicType, + description: core.serialization.string(), +}); + +export declare namespace LlmAsJudgeOutputSchemaPublic { + interface Raw { + name: string; + type: LlmAsJudgeOutputSchemaPublicType.Raw; + description: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaPublicType.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaPublicType.ts new file mode 100644 index 0000000000..7a4e1ab93a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaPublicType.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"; + +export const LlmAsJudgeOutputSchemaPublicType: core.serialization.Schema< + serializers.LlmAsJudgeOutputSchemaPublicType.Raw, + OpikApi.LlmAsJudgeOutputSchemaPublicType +> = core.serialization.enum_(["BOOLEAN", "INTEGER", "DOUBLE"]); + +export declare namespace LlmAsJudgeOutputSchemaPublicType { + type Raw = "BOOLEAN" | "INTEGER" | "DOUBLE"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaType.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaType.ts new file mode 100644 index 0000000000..d0f9dbdee7 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaType.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"; + +export const LlmAsJudgeOutputSchemaType: core.serialization.Schema< + serializers.LlmAsJudgeOutputSchemaType.Raw, + OpikApi.LlmAsJudgeOutputSchemaType +> = core.serialization.enum_(["BOOLEAN", "INTEGER", "DOUBLE"]); + +export declare namespace LlmAsJudgeOutputSchemaType { + type Raw = "BOOLEAN" | "INTEGER" | "DOUBLE"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaWrite.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaWrite.ts new file mode 100644 index 0000000000..41a7bcdcd1 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaWrite.ts @@ -0,0 +1,25 @@ +/** + * 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 { LlmAsJudgeOutputSchemaWriteType } from "./LlmAsJudgeOutputSchemaWriteType"; + +export const LlmAsJudgeOutputSchemaWrite: core.serialization.ObjectSchema< + serializers.LlmAsJudgeOutputSchemaWrite.Raw, + OpikApi.LlmAsJudgeOutputSchemaWrite +> = core.serialization.object({ + name: core.serialization.string(), + type: LlmAsJudgeOutputSchemaWriteType, + description: core.serialization.string(), +}); + +export declare namespace LlmAsJudgeOutputSchemaWrite { + interface Raw { + name: string; + type: LlmAsJudgeOutputSchemaWriteType.Raw; + description: string; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaWriteType.ts b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaWriteType.ts new file mode 100644 index 0000000000..1455c1250a --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/LlmAsJudgeOutputSchemaWriteType.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"; + +export const LlmAsJudgeOutputSchemaWriteType: core.serialization.Schema< + serializers.LlmAsJudgeOutputSchemaWriteType.Raw, + OpikApi.LlmAsJudgeOutputSchemaWriteType +> = core.serialization.enum_(["BOOLEAN", "INTEGER", "DOUBLE"]); + +export declare namespace LlmAsJudgeOutputSchemaWriteType { + type Raw = "BOOLEAN" | "INTEGER" | "DOUBLE"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/PercentageValues.ts b/sdks/typescript/src/opik/rest_api/serialization/types/PercentageValues.ts new file mode 100644 index 0000000000..45a03a51d0 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/PercentageValues.ts @@ -0,0 +1,24 @@ +/** + * 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 const PercentageValues: core.serialization.ObjectSchema< + serializers.PercentageValues.Raw, + OpikApi.PercentageValues +> = core.serialization.object({ + p50: core.serialization.number().optional(), + p90: core.serialization.number().optional(), + p99: core.serialization.number().optional(), +}); + +export declare namespace PercentageValues { + interface Raw { + p50?: number | null; + p90?: number | null; + p99?: number | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Project.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Project.ts index 2c267d2267..2c76291a26 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/Project.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Project.ts @@ -5,6 +5,8 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; +import { FeedbackScoreAverage } from "./FeedbackScoreAverage"; +import { PercentageValues } from "./PercentageValues"; export const Project: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,6 +18,13 @@ export const Project: core.serialization.ObjectSchema | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProjectPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ProjectPublic.ts index db0a6cdc6c..4001ee3fbf 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ProjectPublic.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProjectPublic.ts @@ -5,6 +5,8 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; +import { FeedbackScoreAveragePublic } from "./FeedbackScoreAveragePublic"; +import { PercentageValuesPublic } from "./PercentageValuesPublic"; export const ProjectPublic: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,6 +18,13 @@ export const ProjectPublic: core.serialization.ObjectSchema | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.ts index 441a88116b..e8e60dad61 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKey.ts @@ -5,12 +5,14 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; +import { ProviderApiKeyProvider } from "./ProviderApiKeyProvider"; export const ProviderApiKey: core.serialization.ObjectSchema = core.serialization.object({ id: core.serialization.string().optional(), - provider: core.serialization.stringLiteral("openai"), + provider: ProviderApiKeyProvider, apiKey: core.serialization.property("api_key", core.serialization.string()), + name: core.serialization.string().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()), @@ -20,8 +22,9 @@ export const ProviderApiKey: core.serialization.ObjectSchema = core.serialization.enum_(["openai", "anthropic"]); + +export declare namespace ProviderApiKeyProvider { + type Raw = "openai" | "anthropic"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.ts index 5008b3e6eb..4c08f59fb3 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.ts @@ -5,13 +5,16 @@ import * as serializers from "../index"; import * as OpikApi from "../../api/index"; import * as core from "../../core"; +import { ProviderApiKeyPublicProvider } from "./ProviderApiKeyPublicProvider"; export const ProviderApiKeyPublic: core.serialization.ObjectSchema< serializers.ProviderApiKeyPublic.Raw, OpikApi.ProviderApiKeyPublic > = core.serialization.object({ id: core.serialization.string().optional(), - provider: core.serialization.stringLiteral("openai"), + provider: ProviderApiKeyPublicProvider, + apiKey: core.serialization.property("api_key", core.serialization.string()), + name: core.serialization.string().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()), @@ -21,7 +24,9 @@ export const ProviderApiKeyPublic: core.serialization.ObjectSchema< export declare namespace ProviderApiKeyPublic { interface Raw { id?: string | null; - provider: "openai"; + provider: ProviderApiKeyPublicProvider.Raw; + api_key: string; + name?: string | null; created_at?: string | null; created_by?: string | null; last_updated_at?: string | null; diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublicProvider.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublicProvider.ts new file mode 100644 index 0000000000..46dca3bb04 --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ProviderApiKeyPublicProvider.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"; + +export const ProviderApiKeyPublicProvider: core.serialization.Schema< + serializers.ProviderApiKeyPublicProvider.Raw, + OpikApi.ProviderApiKeyPublicProvider +> = core.serialization.enum_(["openai", "anthropic"]); + +export declare namespace ProviderApiKeyPublicProvider { + type Raw = "openai" | "anthropic"; +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/ScoreName.ts b/sdks/typescript/src/opik/rest_api/serialization/types/ScoreName.ts new file mode 100644 index 0000000000..34fc71ff1b --- /dev/null +++ b/sdks/typescript/src/opik/rest_api/serialization/types/ScoreName.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 const ScoreName: core.serialization.ObjectSchema = + core.serialization.object({ + name: core.serialization.string().optional(), + }); + +export declare namespace ScoreName { + interface Raw { + name?: string | null; + } +} diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/Span.ts b/sdks/typescript/src/opik/rest_api/serialization/types/Span.ts index 926e2290f8..199c945711 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/Span.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/Span.ts @@ -34,6 +34,10 @@ export const Span: core.serialization.ObjectSchema | null; error_info?: ErrorInfoWrite.Raw | null; + total_estimated_cost?: number | null; + total_estimated_cost_version?: string | null; } } diff --git a/sdks/typescript/src/opik/rest_api/serialization/types/index.ts b/sdks/typescript/src/opik/rest_api/serialization/types/index.ts index f1930bf300..515a2bb7c4 100644 --- a/sdks/typescript/src/opik/rest_api/serialization/types/index.ts +++ b/sdks/typescript/src/opik/rest_api/serialization/types/index.ts @@ -4,6 +4,33 @@ export * from "./TraceCountResponse"; export * from "./WorkspaceTraceCount"; export * from "./ErrorMessage"; export * from "./AuthDetailsHolder"; +export * from "./AutomationRuleEvaluator"; +export * from "./AutomationRuleEvaluatorLlmAsJudge"; +export * from "./LlmAsJudgeCode"; +export * from "./LlmAsJudgeMessageRole"; +export * from "./LlmAsJudgeMessage"; +export * from "./LlmAsJudgeModelParameters"; +export * from "./LlmAsJudgeOutputSchemaType"; +export * from "./LlmAsJudgeOutputSchema"; +export * from "./AutomationRuleEvaluatorLlmAsJudgeWrite"; +export * from "./AutomationRuleEvaluatorWrite"; +export * from "./LlmAsJudgeCodeWrite"; +export * from "./LlmAsJudgeMessageWriteRole"; +export * from "./LlmAsJudgeMessageWrite"; +export * from "./LlmAsJudgeModelParametersWrite"; +export * from "./LlmAsJudgeOutputSchemaWriteType"; +export * from "./LlmAsJudgeOutputSchemaWrite"; +export * from "./BatchDelete"; +export * from "./AutomationRuleEvaluatorLlmAsJudgePublic"; +export * from "./AutomationRuleEvaluatorObjectPublic"; +export * from "./AutomationRuleEvaluatorPagePublic"; +export * from "./LlmAsJudgeCodePublic"; +export * from "./LlmAsJudgeMessagePublicRole"; +export * from "./LlmAsJudgeMessagePublic"; +export * from "./LlmAsJudgeModelParametersPublic"; +export * from "./LlmAsJudgeOutputSchemaPublicType"; +export * from "./LlmAsJudgeOutputSchemaPublic"; +export * from "./AutomationRuleEvaluatorPublic"; export * from "./AssistantMessageRole"; export * from "./AssistantMessage"; export * from "./ChatCompletionChoice"; @@ -33,8 +60,6 @@ export * from "./FeedbackScore"; export * from "./JsonNode"; export * from "./DatasetItemWriteSource"; export * from "./DatasetItemWrite"; -export * from "./JsonNodeWrite"; -export * from "./BatchDelete"; export * from "./ColumnCompareTypesItem"; export * from "./ColumnCompare"; export * from "./DatasetItemPageCompare"; @@ -49,7 +74,6 @@ export * from "./DatasetPublic"; export * from "./DatasetItemPublicSource"; export * from "./DatasetItemPublic"; export * from "./ExperimentItemPublic"; -export * from "./JsonNodePublic"; export * from "./ColumnPublicTypesItem"; export * from "./ColumnPublic"; export * from "./DatasetItemPagePublic"; @@ -61,10 +85,12 @@ export * from "./ChunkedOutputJsonNode"; export * from "./Experiment"; export * from "./FeedbackScoreAverage"; export * from "./PromptVersionLink"; +export * from "./JsonNodeWrite"; export * from "./PromptVersionLinkWrite"; export * from "./ExperimentPagePublic"; export * from "./ExperimentPublic"; export * from "./FeedbackScoreAveragePublic"; +export * from "./JsonNodePublic"; export * from "./PromptVersionLinkPublic"; export * from "./ErrorMessagePublic"; export * from "./CategoricalFeedbackDefinition"; @@ -90,10 +116,16 @@ export * from "./FeedbackUpdate"; export * from "./NumericalFeedbackDefinitionUpdate"; export * from "./NumericalFeedbackDetailUpdate"; export * from "./ProjectPagePublic"; +export * from "./ProviderApiKeyPublicProvider"; export * from "./ProviderApiKeyPublic"; +export * from "./ProviderApiKeyProvider"; export * from "./ProviderApiKey"; +export * from "./PercentageValues"; export * from "./Project"; +export * from "./PercentageValuesPublic"; export * from "./ProjectPublic"; +export * from "./FeedbackScoreNames"; +export * from "./ScoreName"; export * from "./DataPointNumberPublic"; export * from "./ProjectMetricResponsePublicMetricType"; export * from "./ProjectMetricResponsePublicInterval"; @@ -126,7 +158,6 @@ export * from "./SpanPagePublic"; export * from "./AvgValueStatPublic"; export * from "./CountValueStatPublic"; export * from "./PercentageValueStatPublic"; -export * from "./PercentageValuesPublic"; export * from "./ProjectStatItemObjectPublic"; export * from "./ProjectStatsPublic"; export * from "./FeedbackScoreBatch";