opik 1.9.12 → 1.9.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +26 -25
- package/dist/index.d.cts +89 -38
- package/dist/index.d.ts +89 -38
- package/dist/index.js +25 -24
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as stream from 'stream';
|
|
2
2
|
import { Logger } from 'tslog';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
|
-
import { LanguageModel } from 'ai';
|
|
4
|
+
import { ModelMessage, SystemModelMessage, UserModelMessage, AssistantModelMessage, ToolModelMessage, LanguageModel } from 'ai';
|
|
5
5
|
import { OpenAIProviderSettings } from '@ai-sdk/openai';
|
|
6
6
|
import { OpenAIChatModelId } from '@ai-sdk/openai/internal';
|
|
7
7
|
import { AnthropicProviderSettings } from '@ai-sdk/anthropic';
|
|
@@ -637,10 +637,11 @@ interface ExperimentStreamRequestPublic {
|
|
|
637
637
|
/**
|
|
638
638
|
* This file was auto-generated by Fern from our API Definition.
|
|
639
639
|
*/
|
|
640
|
-
type FindFeedbackDefinitionsRequestType = "numerical" | "categorical";
|
|
640
|
+
type FindFeedbackDefinitionsRequestType = "numerical" | "categorical" | "boolean";
|
|
641
641
|
declare const FindFeedbackDefinitionsRequestType: {
|
|
642
642
|
readonly Numerical: "numerical";
|
|
643
643
|
readonly Categorical: "categorical";
|
|
644
|
+
readonly Boolean: "boolean";
|
|
644
645
|
};
|
|
645
646
|
|
|
646
647
|
/**
|
|
@@ -1738,10 +1739,12 @@ interface WorkspaceTraceCount {
|
|
|
1738
1739
|
/**
|
|
1739
1740
|
* This file was auto-generated by Fern from our API Definition.
|
|
1740
1741
|
*/
|
|
1741
|
-
type AlertTriggerConfigWriteType = "scope:project" | "threshold:feedback_score";
|
|
1742
|
+
type AlertTriggerConfigWriteType = "scope:project" | "threshold:feedback_score" | "threshold:cost" | "threshold:latency";
|
|
1742
1743
|
declare const AlertTriggerConfigWriteType: {
|
|
1743
1744
|
readonly ScopeProject: "scope:project";
|
|
1744
1745
|
readonly ThresholdFeedbackScore: "threshold:feedback_score";
|
|
1746
|
+
readonly ThresholdCost: "threshold:cost";
|
|
1747
|
+
readonly ThresholdLatency: "threshold:latency";
|
|
1745
1748
|
};
|
|
1746
1749
|
|
|
1747
1750
|
/**
|
|
@@ -1838,10 +1841,12 @@ interface AlertPagePublic {
|
|
|
1838
1841
|
/**
|
|
1839
1842
|
* This file was auto-generated by Fern from our API Definition.
|
|
1840
1843
|
*/
|
|
1841
|
-
type AlertTriggerConfigPublicType = "scope:project" | "threshold:feedback_score";
|
|
1844
|
+
type AlertTriggerConfigPublicType = "scope:project" | "threshold:feedback_score" | "threshold:cost" | "threshold:latency";
|
|
1842
1845
|
declare const AlertTriggerConfigPublicType: {
|
|
1843
1846
|
readonly ScopeProject: "scope:project";
|
|
1844
1847
|
readonly ThresholdFeedbackScore: "threshold:feedback_score";
|
|
1848
|
+
readonly ThresholdCost: "threshold:cost";
|
|
1849
|
+
readonly ThresholdLatency: "threshold:latency";
|
|
1845
1850
|
};
|
|
1846
1851
|
|
|
1847
1852
|
/**
|
|
@@ -3965,6 +3970,24 @@ interface GroupContentWithAggregations {
|
|
|
3965
3970
|
*/
|
|
3966
3971
|
type JsonNode = Record<string, unknown>;
|
|
3967
3972
|
|
|
3973
|
+
/**
|
|
3974
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3975
|
+
*/
|
|
3976
|
+
|
|
3977
|
+
interface BooleanFeedbackDefinitionCreate {
|
|
3978
|
+
details?: BooleanFeedbackDetailCreate;
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
/**
|
|
3982
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3983
|
+
*/
|
|
3984
|
+
interface BooleanFeedbackDetailCreate {
|
|
3985
|
+
/** Label for true/1 value */
|
|
3986
|
+
trueLabel: string;
|
|
3987
|
+
/** Label for false/0 value */
|
|
3988
|
+
falseLabel: string;
|
|
3989
|
+
}
|
|
3990
|
+
|
|
3968
3991
|
/**
|
|
3969
3992
|
* This file was auto-generated by Fern from our API Definition.
|
|
3970
3993
|
*/
|
|
@@ -3984,7 +4007,7 @@ interface CategoricalFeedbackDetailCreate {
|
|
|
3984
4007
|
* This file was auto-generated by Fern from our API Definition.
|
|
3985
4008
|
*/
|
|
3986
4009
|
|
|
3987
|
-
type FeedbackCreate = FeedbackCreate.Numerical | FeedbackCreate.Categorical;
|
|
4010
|
+
type FeedbackCreate = FeedbackCreate.Numerical | FeedbackCreate.Categorical | FeedbackCreate.Boolean;
|
|
3988
4011
|
declare namespace FeedbackCreate {
|
|
3989
4012
|
interface Numerical extends NumericalFeedbackDefinitionCreate, _Base {
|
|
3990
4013
|
type: "numerical";
|
|
@@ -3992,6 +4015,9 @@ declare namespace FeedbackCreate {
|
|
|
3992
4015
|
interface Categorical extends CategoricalFeedbackDefinitionCreate, _Base {
|
|
3993
4016
|
type: "categorical";
|
|
3994
4017
|
}
|
|
4018
|
+
interface Boolean extends BooleanFeedbackDefinitionCreate, _Base {
|
|
4019
|
+
type: "boolean";
|
|
4020
|
+
}
|
|
3995
4021
|
interface _Base {
|
|
3996
4022
|
id?: string;
|
|
3997
4023
|
name: string;
|
|
@@ -4016,6 +4042,28 @@ interface NumericalFeedbackDetailCreate {
|
|
|
4016
4042
|
min: number;
|
|
4017
4043
|
}
|
|
4018
4044
|
|
|
4045
|
+
/**
|
|
4046
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4047
|
+
*/
|
|
4048
|
+
|
|
4049
|
+
interface BooleanFeedbackDefinitionPublic {
|
|
4050
|
+
details?: BooleanFeedbackDetailPublic;
|
|
4051
|
+
createdAt?: Date;
|
|
4052
|
+
createdBy?: string;
|
|
4053
|
+
lastUpdatedAt?: Date;
|
|
4054
|
+
lastUpdatedBy?: string;
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4059
|
+
*/
|
|
4060
|
+
interface BooleanFeedbackDetailPublic {
|
|
4061
|
+
/** Label for true/1 value */
|
|
4062
|
+
trueLabel: string;
|
|
4063
|
+
/** Label for false/0 value */
|
|
4064
|
+
falseLabel: string;
|
|
4065
|
+
}
|
|
4066
|
+
|
|
4019
4067
|
/**
|
|
4020
4068
|
* This file was auto-generated by Fern from our API Definition.
|
|
4021
4069
|
*/
|
|
@@ -4050,7 +4098,7 @@ interface FeedbackDefinitionPagePublic {
|
|
|
4050
4098
|
* This file was auto-generated by Fern from our API Definition.
|
|
4051
4099
|
*/
|
|
4052
4100
|
|
|
4053
|
-
type FeedbackObjectPublic = FeedbackObjectPublic.Numerical | FeedbackObjectPublic.Categorical;
|
|
4101
|
+
type FeedbackObjectPublic = FeedbackObjectPublic.Numerical | FeedbackObjectPublic.Categorical | FeedbackObjectPublic.Boolean;
|
|
4054
4102
|
declare namespace FeedbackObjectPublic {
|
|
4055
4103
|
interface Numerical extends NumericalFeedbackDefinitionPublic, _Base {
|
|
4056
4104
|
type: "numerical";
|
|
@@ -4058,6 +4106,9 @@ declare namespace FeedbackObjectPublic {
|
|
|
4058
4106
|
interface Categorical extends CategoricalFeedbackDefinitionPublic, _Base {
|
|
4059
4107
|
type: "categorical";
|
|
4060
4108
|
}
|
|
4109
|
+
interface Boolean extends BooleanFeedbackDefinitionPublic, _Base {
|
|
4110
|
+
type: "boolean";
|
|
4111
|
+
}
|
|
4061
4112
|
interface _Base {
|
|
4062
4113
|
id?: string;
|
|
4063
4114
|
name: string;
|
|
@@ -4094,7 +4145,7 @@ interface NumericalFeedbackDetailPublic {
|
|
|
4094
4145
|
* This file was auto-generated by Fern from our API Definition.
|
|
4095
4146
|
*/
|
|
4096
4147
|
|
|
4097
|
-
type FeedbackPublic = FeedbackPublic.Numerical | FeedbackPublic.Categorical;
|
|
4148
|
+
type FeedbackPublic = FeedbackPublic.Numerical | FeedbackPublic.Categorical | FeedbackPublic.Boolean;
|
|
4098
4149
|
declare namespace FeedbackPublic {
|
|
4099
4150
|
interface Numerical extends NumericalFeedbackDefinitionPublic, _Base {
|
|
4100
4151
|
type: "numerical";
|
|
@@ -4102,6 +4153,9 @@ declare namespace FeedbackPublic {
|
|
|
4102
4153
|
interface Categorical extends CategoricalFeedbackDefinitionPublic, _Base {
|
|
4103
4154
|
type: "categorical";
|
|
4104
4155
|
}
|
|
4156
|
+
interface Boolean extends BooleanFeedbackDefinitionPublic, _Base {
|
|
4157
|
+
type: "boolean";
|
|
4158
|
+
}
|
|
4105
4159
|
interface _Base {
|
|
4106
4160
|
id?: string;
|
|
4107
4161
|
name: string;
|
|
@@ -4114,6 +4168,24 @@ declare namespace FeedbackPublic {
|
|
|
4114
4168
|
}
|
|
4115
4169
|
}
|
|
4116
4170
|
|
|
4171
|
+
/**
|
|
4172
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4173
|
+
*/
|
|
4174
|
+
|
|
4175
|
+
interface BooleanFeedbackDefinitionUpdate {
|
|
4176
|
+
details?: BooleanFeedbackDetailUpdate;
|
|
4177
|
+
}
|
|
4178
|
+
|
|
4179
|
+
/**
|
|
4180
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4181
|
+
*/
|
|
4182
|
+
interface BooleanFeedbackDetailUpdate {
|
|
4183
|
+
/** Label for true/1 value */
|
|
4184
|
+
trueLabel: string;
|
|
4185
|
+
/** Label for false/0 value */
|
|
4186
|
+
falseLabel: string;
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4117
4189
|
/**
|
|
4118
4190
|
* This file was auto-generated by Fern from our API Definition.
|
|
4119
4191
|
*/
|
|
@@ -4133,7 +4205,7 @@ interface CategoricalFeedbackDetailUpdate {
|
|
|
4133
4205
|
* This file was auto-generated by Fern from our API Definition.
|
|
4134
4206
|
*/
|
|
4135
4207
|
|
|
4136
|
-
type FeedbackUpdate = FeedbackUpdate.Numerical | FeedbackUpdate.Categorical;
|
|
4208
|
+
type FeedbackUpdate = FeedbackUpdate.Numerical | FeedbackUpdate.Categorical | FeedbackUpdate.Boolean;
|
|
4137
4209
|
declare namespace FeedbackUpdate {
|
|
4138
4210
|
interface Numerical extends NumericalFeedbackDefinitionUpdate, _Base {
|
|
4139
4211
|
type: "numerical";
|
|
@@ -4141,6 +4213,9 @@ declare namespace FeedbackUpdate {
|
|
|
4141
4213
|
interface Categorical extends CategoricalFeedbackDefinitionUpdate, _Base {
|
|
4142
4214
|
type: "categorical";
|
|
4143
4215
|
}
|
|
4216
|
+
interface Boolean extends BooleanFeedbackDefinitionUpdate, _Base {
|
|
4217
|
+
type: "boolean";
|
|
4218
|
+
}
|
|
4144
4219
|
interface _Base {
|
|
4145
4220
|
id?: string;
|
|
4146
4221
|
name: string;
|
|
@@ -9732,14 +9807,6 @@ interface EvaluateOptions<T = Record<string, unknown>> {
|
|
|
9732
9807
|
}
|
|
9733
9808
|
declare function evaluate<T = Record<string, unknown>>(options: EvaluateOptions<T>): Promise<EvaluationResult>;
|
|
9734
9809
|
|
|
9735
|
-
type JSONValue = null | string | number | boolean | {
|
|
9736
|
-
[value: string]: JSONValue;
|
|
9737
|
-
} | Array<JSONValue>;
|
|
9738
|
-
/**
|
|
9739
|
-
* Provider-specific options.
|
|
9740
|
-
* Allows providers to pass through custom metadata and functionality.
|
|
9741
|
-
*/
|
|
9742
|
-
type ProviderOptions = Record<string, Record<string, JSONValue>>;
|
|
9743
9810
|
/**
|
|
9744
9811
|
* System message containing system instructions.
|
|
9745
9812
|
*
|
|
@@ -9747,42 +9814,26 @@ type ProviderOptions = Record<string, Record<string, JSONValue>>;
|
|
|
9747
9814
|
* to increase the resilience against prompt injection attacks,
|
|
9748
9815
|
* and because not all providers support several system messages.
|
|
9749
9816
|
*/
|
|
9750
|
-
|
|
9751
|
-
role: "system";
|
|
9752
|
-
content: string;
|
|
9753
|
-
providerOptions?: ProviderOptions;
|
|
9754
|
-
}
|
|
9817
|
+
type OpikSystemMessage = SystemModelMessage;
|
|
9755
9818
|
/**
|
|
9756
9819
|
* User message containing user input.
|
|
9757
9820
|
*/
|
|
9758
|
-
|
|
9759
|
-
role: "user";
|
|
9760
|
-
content: string;
|
|
9761
|
-
providerOptions?: ProviderOptions;
|
|
9762
|
-
}
|
|
9821
|
+
type OpikUserMessage = UserModelMessage;
|
|
9763
9822
|
/**
|
|
9764
9823
|
* Assistant message containing model response.
|
|
9765
9824
|
*/
|
|
9766
|
-
|
|
9767
|
-
role: "assistant";
|
|
9768
|
-
content: string;
|
|
9769
|
-
providerOptions?: ProviderOptions;
|
|
9770
|
-
}
|
|
9825
|
+
type OpikAssistantMessage = AssistantModelMessage;
|
|
9771
9826
|
/**
|
|
9772
9827
|
* Tool message containing tool call results.
|
|
9773
9828
|
*/
|
|
9774
|
-
|
|
9775
|
-
role: "tool";
|
|
9776
|
-
content: string;
|
|
9777
|
-
providerOptions?: ProviderOptions;
|
|
9778
|
-
}
|
|
9829
|
+
type OpikToolMessage = ToolModelMessage;
|
|
9779
9830
|
/**
|
|
9780
9831
|
* Union type of all message types.
|
|
9781
9832
|
* This is the main type to use for message arrays in LLM conversations.
|
|
9782
9833
|
*
|
|
9783
9834
|
* Provider-agnostic interface that can be adapted to any LLM provider.
|
|
9784
9835
|
*/
|
|
9785
|
-
type OpikMessage =
|
|
9836
|
+
type OpikMessage = ModelMessage;
|
|
9786
9837
|
/**
|
|
9787
9838
|
* Abstract base class for all LLM model providers in Opik evaluation system.
|
|
9788
9839
|
*
|
|
@@ -11200,4 +11251,4 @@ declare class OpikQueryLanguage {
|
|
|
11200
11251
|
private parseConnector;
|
|
11201
11252
|
}
|
|
11202
11253
|
|
|
11203
|
-
export { type AllProviderOptions, AnswerRelevance, type AnthropicProviderOptions, BaseLLMJudgeMetric, BaseMetric, Contains, type DatasetPublic, type EvaluateOptions, type EvaluatePromptOptions, type EvaluationResult, type EvaluationScoreResult, type EvaluationTask, type EvaluationTestCase, type EvaluationTestResult, ExactMatch, type FewShotExampleAnswerRelevanceNoContext, type FewShotExampleAnswerRelevanceWithContext, type FewShotExampleHallucination, type FewShotExampleModeration, type FilterExpression, type GoogleProviderOptions, Hallucination, IsJson, type LLMJudgeModelSettings, type LLMJudgeResponseFormat, ModelConfigurationError, ModelError, ModelGenerationError, Moderation, type OpenAIProviderOptions, OpikClient as Opik, type OpikAssistantMessage, OpikBaseModel, type OpikConfig, type OpikMessage, OpikQueryLanguage, SpanType as OpikSpanType, type OpikSystemMessage, type OpikToolMessage, type OpikUserMessage, Prompt, PromptType, type
|
|
11254
|
+
export { type AllProviderOptions, AnswerRelevance, type AnthropicProviderOptions, BaseLLMJudgeMetric, BaseMetric, Contains, type DatasetPublic, type EvaluateOptions, type EvaluatePromptOptions, type EvaluationResult, type EvaluationScoreResult, type EvaluationTask, type EvaluationTestCase, type EvaluationTestResult, ExactMatch, type FewShotExampleAnswerRelevanceNoContext, type FewShotExampleAnswerRelevanceWithContext, type FewShotExampleHallucination, type FewShotExampleModeration, type FilterExpression, type GoogleProviderOptions, Hallucination, IsJson, type LLMJudgeModelSettings, type LLMJudgeResponseFormat, ModelConfigurationError, ModelError, ModelGenerationError, Moderation, type OpenAIProviderOptions, OpikClient as Opik, type OpikAssistantMessage, OpikBaseModel, type OpikConfig, type OpikMessage, OpikQueryLanguage, SpanType as OpikSpanType, type OpikSystemMessage, type OpikToolMessage, type OpikUserMessage, Prompt, PromptType, type ProviderOptionsForModel, RegexMatch, type ScoringKeyMappingType, Span, SpanType, type SupportedModelId, Trace, Usefulness, VercelAIChatModel, createModel, createModelFromInstance, detectProvider, disableLogger, evaluate, evaluatePrompt, flushAll, generateId, getTrackContext, logger, resolveModel, setLoggerLevel, track };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as stream from 'stream';
|
|
2
2
|
import { Logger } from 'tslog';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
|
-
import { LanguageModel } from 'ai';
|
|
4
|
+
import { ModelMessage, SystemModelMessage, UserModelMessage, AssistantModelMessage, ToolModelMessage, LanguageModel } from 'ai';
|
|
5
5
|
import { OpenAIProviderSettings } from '@ai-sdk/openai';
|
|
6
6
|
import { OpenAIChatModelId } from '@ai-sdk/openai/internal';
|
|
7
7
|
import { AnthropicProviderSettings } from '@ai-sdk/anthropic';
|
|
@@ -637,10 +637,11 @@ interface ExperimentStreamRequestPublic {
|
|
|
637
637
|
/**
|
|
638
638
|
* This file was auto-generated by Fern from our API Definition.
|
|
639
639
|
*/
|
|
640
|
-
type FindFeedbackDefinitionsRequestType = "numerical" | "categorical";
|
|
640
|
+
type FindFeedbackDefinitionsRequestType = "numerical" | "categorical" | "boolean";
|
|
641
641
|
declare const FindFeedbackDefinitionsRequestType: {
|
|
642
642
|
readonly Numerical: "numerical";
|
|
643
643
|
readonly Categorical: "categorical";
|
|
644
|
+
readonly Boolean: "boolean";
|
|
644
645
|
};
|
|
645
646
|
|
|
646
647
|
/**
|
|
@@ -1738,10 +1739,12 @@ interface WorkspaceTraceCount {
|
|
|
1738
1739
|
/**
|
|
1739
1740
|
* This file was auto-generated by Fern from our API Definition.
|
|
1740
1741
|
*/
|
|
1741
|
-
type AlertTriggerConfigWriteType = "scope:project" | "threshold:feedback_score";
|
|
1742
|
+
type AlertTriggerConfigWriteType = "scope:project" | "threshold:feedback_score" | "threshold:cost" | "threshold:latency";
|
|
1742
1743
|
declare const AlertTriggerConfigWriteType: {
|
|
1743
1744
|
readonly ScopeProject: "scope:project";
|
|
1744
1745
|
readonly ThresholdFeedbackScore: "threshold:feedback_score";
|
|
1746
|
+
readonly ThresholdCost: "threshold:cost";
|
|
1747
|
+
readonly ThresholdLatency: "threshold:latency";
|
|
1745
1748
|
};
|
|
1746
1749
|
|
|
1747
1750
|
/**
|
|
@@ -1838,10 +1841,12 @@ interface AlertPagePublic {
|
|
|
1838
1841
|
/**
|
|
1839
1842
|
* This file was auto-generated by Fern from our API Definition.
|
|
1840
1843
|
*/
|
|
1841
|
-
type AlertTriggerConfigPublicType = "scope:project" | "threshold:feedback_score";
|
|
1844
|
+
type AlertTriggerConfigPublicType = "scope:project" | "threshold:feedback_score" | "threshold:cost" | "threshold:latency";
|
|
1842
1845
|
declare const AlertTriggerConfigPublicType: {
|
|
1843
1846
|
readonly ScopeProject: "scope:project";
|
|
1844
1847
|
readonly ThresholdFeedbackScore: "threshold:feedback_score";
|
|
1848
|
+
readonly ThresholdCost: "threshold:cost";
|
|
1849
|
+
readonly ThresholdLatency: "threshold:latency";
|
|
1845
1850
|
};
|
|
1846
1851
|
|
|
1847
1852
|
/**
|
|
@@ -3965,6 +3970,24 @@ interface GroupContentWithAggregations {
|
|
|
3965
3970
|
*/
|
|
3966
3971
|
type JsonNode = Record<string, unknown>;
|
|
3967
3972
|
|
|
3973
|
+
/**
|
|
3974
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3975
|
+
*/
|
|
3976
|
+
|
|
3977
|
+
interface BooleanFeedbackDefinitionCreate {
|
|
3978
|
+
details?: BooleanFeedbackDetailCreate;
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
/**
|
|
3982
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3983
|
+
*/
|
|
3984
|
+
interface BooleanFeedbackDetailCreate {
|
|
3985
|
+
/** Label for true/1 value */
|
|
3986
|
+
trueLabel: string;
|
|
3987
|
+
/** Label for false/0 value */
|
|
3988
|
+
falseLabel: string;
|
|
3989
|
+
}
|
|
3990
|
+
|
|
3968
3991
|
/**
|
|
3969
3992
|
* This file was auto-generated by Fern from our API Definition.
|
|
3970
3993
|
*/
|
|
@@ -3984,7 +4007,7 @@ interface CategoricalFeedbackDetailCreate {
|
|
|
3984
4007
|
* This file was auto-generated by Fern from our API Definition.
|
|
3985
4008
|
*/
|
|
3986
4009
|
|
|
3987
|
-
type FeedbackCreate = FeedbackCreate.Numerical | FeedbackCreate.Categorical;
|
|
4010
|
+
type FeedbackCreate = FeedbackCreate.Numerical | FeedbackCreate.Categorical | FeedbackCreate.Boolean;
|
|
3988
4011
|
declare namespace FeedbackCreate {
|
|
3989
4012
|
interface Numerical extends NumericalFeedbackDefinitionCreate, _Base {
|
|
3990
4013
|
type: "numerical";
|
|
@@ -3992,6 +4015,9 @@ declare namespace FeedbackCreate {
|
|
|
3992
4015
|
interface Categorical extends CategoricalFeedbackDefinitionCreate, _Base {
|
|
3993
4016
|
type: "categorical";
|
|
3994
4017
|
}
|
|
4018
|
+
interface Boolean extends BooleanFeedbackDefinitionCreate, _Base {
|
|
4019
|
+
type: "boolean";
|
|
4020
|
+
}
|
|
3995
4021
|
interface _Base {
|
|
3996
4022
|
id?: string;
|
|
3997
4023
|
name: string;
|
|
@@ -4016,6 +4042,28 @@ interface NumericalFeedbackDetailCreate {
|
|
|
4016
4042
|
min: number;
|
|
4017
4043
|
}
|
|
4018
4044
|
|
|
4045
|
+
/**
|
|
4046
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4047
|
+
*/
|
|
4048
|
+
|
|
4049
|
+
interface BooleanFeedbackDefinitionPublic {
|
|
4050
|
+
details?: BooleanFeedbackDetailPublic;
|
|
4051
|
+
createdAt?: Date;
|
|
4052
|
+
createdBy?: string;
|
|
4053
|
+
lastUpdatedAt?: Date;
|
|
4054
|
+
lastUpdatedBy?: string;
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4059
|
+
*/
|
|
4060
|
+
interface BooleanFeedbackDetailPublic {
|
|
4061
|
+
/** Label for true/1 value */
|
|
4062
|
+
trueLabel: string;
|
|
4063
|
+
/** Label for false/0 value */
|
|
4064
|
+
falseLabel: string;
|
|
4065
|
+
}
|
|
4066
|
+
|
|
4019
4067
|
/**
|
|
4020
4068
|
* This file was auto-generated by Fern from our API Definition.
|
|
4021
4069
|
*/
|
|
@@ -4050,7 +4098,7 @@ interface FeedbackDefinitionPagePublic {
|
|
|
4050
4098
|
* This file was auto-generated by Fern from our API Definition.
|
|
4051
4099
|
*/
|
|
4052
4100
|
|
|
4053
|
-
type FeedbackObjectPublic = FeedbackObjectPublic.Numerical | FeedbackObjectPublic.Categorical;
|
|
4101
|
+
type FeedbackObjectPublic = FeedbackObjectPublic.Numerical | FeedbackObjectPublic.Categorical | FeedbackObjectPublic.Boolean;
|
|
4054
4102
|
declare namespace FeedbackObjectPublic {
|
|
4055
4103
|
interface Numerical extends NumericalFeedbackDefinitionPublic, _Base {
|
|
4056
4104
|
type: "numerical";
|
|
@@ -4058,6 +4106,9 @@ declare namespace FeedbackObjectPublic {
|
|
|
4058
4106
|
interface Categorical extends CategoricalFeedbackDefinitionPublic, _Base {
|
|
4059
4107
|
type: "categorical";
|
|
4060
4108
|
}
|
|
4109
|
+
interface Boolean extends BooleanFeedbackDefinitionPublic, _Base {
|
|
4110
|
+
type: "boolean";
|
|
4111
|
+
}
|
|
4061
4112
|
interface _Base {
|
|
4062
4113
|
id?: string;
|
|
4063
4114
|
name: string;
|
|
@@ -4094,7 +4145,7 @@ interface NumericalFeedbackDetailPublic {
|
|
|
4094
4145
|
* This file was auto-generated by Fern from our API Definition.
|
|
4095
4146
|
*/
|
|
4096
4147
|
|
|
4097
|
-
type FeedbackPublic = FeedbackPublic.Numerical | FeedbackPublic.Categorical;
|
|
4148
|
+
type FeedbackPublic = FeedbackPublic.Numerical | FeedbackPublic.Categorical | FeedbackPublic.Boolean;
|
|
4098
4149
|
declare namespace FeedbackPublic {
|
|
4099
4150
|
interface Numerical extends NumericalFeedbackDefinitionPublic, _Base {
|
|
4100
4151
|
type: "numerical";
|
|
@@ -4102,6 +4153,9 @@ declare namespace FeedbackPublic {
|
|
|
4102
4153
|
interface Categorical extends CategoricalFeedbackDefinitionPublic, _Base {
|
|
4103
4154
|
type: "categorical";
|
|
4104
4155
|
}
|
|
4156
|
+
interface Boolean extends BooleanFeedbackDefinitionPublic, _Base {
|
|
4157
|
+
type: "boolean";
|
|
4158
|
+
}
|
|
4105
4159
|
interface _Base {
|
|
4106
4160
|
id?: string;
|
|
4107
4161
|
name: string;
|
|
@@ -4114,6 +4168,24 @@ declare namespace FeedbackPublic {
|
|
|
4114
4168
|
}
|
|
4115
4169
|
}
|
|
4116
4170
|
|
|
4171
|
+
/**
|
|
4172
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4173
|
+
*/
|
|
4174
|
+
|
|
4175
|
+
interface BooleanFeedbackDefinitionUpdate {
|
|
4176
|
+
details?: BooleanFeedbackDetailUpdate;
|
|
4177
|
+
}
|
|
4178
|
+
|
|
4179
|
+
/**
|
|
4180
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4181
|
+
*/
|
|
4182
|
+
interface BooleanFeedbackDetailUpdate {
|
|
4183
|
+
/** Label for true/1 value */
|
|
4184
|
+
trueLabel: string;
|
|
4185
|
+
/** Label for false/0 value */
|
|
4186
|
+
falseLabel: string;
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4117
4189
|
/**
|
|
4118
4190
|
* This file was auto-generated by Fern from our API Definition.
|
|
4119
4191
|
*/
|
|
@@ -4133,7 +4205,7 @@ interface CategoricalFeedbackDetailUpdate {
|
|
|
4133
4205
|
* This file was auto-generated by Fern from our API Definition.
|
|
4134
4206
|
*/
|
|
4135
4207
|
|
|
4136
|
-
type FeedbackUpdate = FeedbackUpdate.Numerical | FeedbackUpdate.Categorical;
|
|
4208
|
+
type FeedbackUpdate = FeedbackUpdate.Numerical | FeedbackUpdate.Categorical | FeedbackUpdate.Boolean;
|
|
4137
4209
|
declare namespace FeedbackUpdate {
|
|
4138
4210
|
interface Numerical extends NumericalFeedbackDefinitionUpdate, _Base {
|
|
4139
4211
|
type: "numerical";
|
|
@@ -4141,6 +4213,9 @@ declare namespace FeedbackUpdate {
|
|
|
4141
4213
|
interface Categorical extends CategoricalFeedbackDefinitionUpdate, _Base {
|
|
4142
4214
|
type: "categorical";
|
|
4143
4215
|
}
|
|
4216
|
+
interface Boolean extends BooleanFeedbackDefinitionUpdate, _Base {
|
|
4217
|
+
type: "boolean";
|
|
4218
|
+
}
|
|
4144
4219
|
interface _Base {
|
|
4145
4220
|
id?: string;
|
|
4146
4221
|
name: string;
|
|
@@ -9732,14 +9807,6 @@ interface EvaluateOptions<T = Record<string, unknown>> {
|
|
|
9732
9807
|
}
|
|
9733
9808
|
declare function evaluate<T = Record<string, unknown>>(options: EvaluateOptions<T>): Promise<EvaluationResult>;
|
|
9734
9809
|
|
|
9735
|
-
type JSONValue = null | string | number | boolean | {
|
|
9736
|
-
[value: string]: JSONValue;
|
|
9737
|
-
} | Array<JSONValue>;
|
|
9738
|
-
/**
|
|
9739
|
-
* Provider-specific options.
|
|
9740
|
-
* Allows providers to pass through custom metadata and functionality.
|
|
9741
|
-
*/
|
|
9742
|
-
type ProviderOptions = Record<string, Record<string, JSONValue>>;
|
|
9743
9810
|
/**
|
|
9744
9811
|
* System message containing system instructions.
|
|
9745
9812
|
*
|
|
@@ -9747,42 +9814,26 @@ type ProviderOptions = Record<string, Record<string, JSONValue>>;
|
|
|
9747
9814
|
* to increase the resilience against prompt injection attacks,
|
|
9748
9815
|
* and because not all providers support several system messages.
|
|
9749
9816
|
*/
|
|
9750
|
-
|
|
9751
|
-
role: "system";
|
|
9752
|
-
content: string;
|
|
9753
|
-
providerOptions?: ProviderOptions;
|
|
9754
|
-
}
|
|
9817
|
+
type OpikSystemMessage = SystemModelMessage;
|
|
9755
9818
|
/**
|
|
9756
9819
|
* User message containing user input.
|
|
9757
9820
|
*/
|
|
9758
|
-
|
|
9759
|
-
role: "user";
|
|
9760
|
-
content: string;
|
|
9761
|
-
providerOptions?: ProviderOptions;
|
|
9762
|
-
}
|
|
9821
|
+
type OpikUserMessage = UserModelMessage;
|
|
9763
9822
|
/**
|
|
9764
9823
|
* Assistant message containing model response.
|
|
9765
9824
|
*/
|
|
9766
|
-
|
|
9767
|
-
role: "assistant";
|
|
9768
|
-
content: string;
|
|
9769
|
-
providerOptions?: ProviderOptions;
|
|
9770
|
-
}
|
|
9825
|
+
type OpikAssistantMessage = AssistantModelMessage;
|
|
9771
9826
|
/**
|
|
9772
9827
|
* Tool message containing tool call results.
|
|
9773
9828
|
*/
|
|
9774
|
-
|
|
9775
|
-
role: "tool";
|
|
9776
|
-
content: string;
|
|
9777
|
-
providerOptions?: ProviderOptions;
|
|
9778
|
-
}
|
|
9829
|
+
type OpikToolMessage = ToolModelMessage;
|
|
9779
9830
|
/**
|
|
9780
9831
|
* Union type of all message types.
|
|
9781
9832
|
* This is the main type to use for message arrays in LLM conversations.
|
|
9782
9833
|
*
|
|
9783
9834
|
* Provider-agnostic interface that can be adapted to any LLM provider.
|
|
9784
9835
|
*/
|
|
9785
|
-
type OpikMessage =
|
|
9836
|
+
type OpikMessage = ModelMessage;
|
|
9786
9837
|
/**
|
|
9787
9838
|
* Abstract base class for all LLM model providers in Opik evaluation system.
|
|
9788
9839
|
*
|
|
@@ -11200,4 +11251,4 @@ declare class OpikQueryLanguage {
|
|
|
11200
11251
|
private parseConnector;
|
|
11201
11252
|
}
|
|
11202
11253
|
|
|
11203
|
-
export { type AllProviderOptions, AnswerRelevance, type AnthropicProviderOptions, BaseLLMJudgeMetric, BaseMetric, Contains, type DatasetPublic, type EvaluateOptions, type EvaluatePromptOptions, type EvaluationResult, type EvaluationScoreResult, type EvaluationTask, type EvaluationTestCase, type EvaluationTestResult, ExactMatch, type FewShotExampleAnswerRelevanceNoContext, type FewShotExampleAnswerRelevanceWithContext, type FewShotExampleHallucination, type FewShotExampleModeration, type FilterExpression, type GoogleProviderOptions, Hallucination, IsJson, type LLMJudgeModelSettings, type LLMJudgeResponseFormat, ModelConfigurationError, ModelError, ModelGenerationError, Moderation, type OpenAIProviderOptions, OpikClient as Opik, type OpikAssistantMessage, OpikBaseModel, type OpikConfig, type OpikMessage, OpikQueryLanguage, SpanType as OpikSpanType, type OpikSystemMessage, type OpikToolMessage, type OpikUserMessage, Prompt, PromptType, type
|
|
11254
|
+
export { type AllProviderOptions, AnswerRelevance, type AnthropicProviderOptions, BaseLLMJudgeMetric, BaseMetric, Contains, type DatasetPublic, type EvaluateOptions, type EvaluatePromptOptions, type EvaluationResult, type EvaluationScoreResult, type EvaluationTask, type EvaluationTestCase, type EvaluationTestResult, ExactMatch, type FewShotExampleAnswerRelevanceNoContext, type FewShotExampleAnswerRelevanceWithContext, type FewShotExampleHallucination, type FewShotExampleModeration, type FilterExpression, type GoogleProviderOptions, Hallucination, IsJson, type LLMJudgeModelSettings, type LLMJudgeResponseFormat, ModelConfigurationError, ModelError, ModelGenerationError, Moderation, type OpenAIProviderOptions, OpikClient as Opik, type OpikAssistantMessage, OpikBaseModel, type OpikConfig, type OpikMessage, OpikQueryLanguage, SpanType as OpikSpanType, type OpikSystemMessage, type OpikToolMessage, type OpikUserMessage, Prompt, PromptType, type ProviderOptionsForModel, RegexMatch, type ScoringKeyMappingType, Span, SpanType, type SupportedModelId, Trace, Usefulness, VercelAIChatModel, createModel, createModelFromInstance, detectProvider, disableLogger, evaluate, evaluatePrompt, flushAll, generateId, getTrackContext, logger, resolveModel, setLoggerLevel, track };
|