Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface CreateLlmAsJudgeEvaluatorRequest {
description?: string | null;
/** Evaluator type. */
type: "llm_as_judge";
/** User prompt string shortcut or a list containing exactly one user chat message. */
/** User prompt string shortcut or an ordered list of chat messages. */
prompt: LangfuseAPI.EvaluatorChatPromptInput;
/** Explicit model configuration. Set to `null` or omit to use the project's default evaluation model. */
modelConfig?: LangfuseAPI.EvaluatorModelConfig | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as LangfuseAPI from "../../../index.js";

/**
* One user chat message in an evaluator prompt.
* One chat message in an evaluator prompt.
*/
export interface EvaluatorChatMessage {
role: "user";
role: LangfuseAPI.EvaluatorChatMessageRole;
/** Message content. Evaluator variables use `{{variable}}` syntax. */
content: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

/**
* Role of an evaluator prompt message.
*/
export type EvaluatorChatMessageRole = "system" | "user" | "assistant";
export const EvaluatorChatMessageRole = {
System: "system",
User: "user",
Assistant: "assistant",
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
import * as LangfuseAPI from "../../../index.js";

/**
* A list containing exactly one user chat message.
* An ordered list of chat messages. A system message is only allowed as the first message.
*/
Comment thread
wochinge marked this conversation as resolved.
export type EvaluatorChatPrompt = LangfuseAPI.EvaluatorChatMessage[];
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
import * as LangfuseAPI from "../../../index.js";

/**
* A user prompt string, or a list containing exactly one user chat message.
* A user prompt string shortcut, or an ordered list of chat messages.
*/
export type EvaluatorChatPromptInput = string | LangfuseAPI.EvaluatorChatPrompt;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as LangfuseAPI from "../../../index.js";
export interface LlmAsJudgeEvaluator extends LangfuseAPI.EvaluatorBase {
/** Evaluator type. */
type: "llm_as_judge";
/** The single user chat message used by the latest evaluator version. */
/** Ordered chat messages used by the latest evaluator version. */
prompt: LangfuseAPI.EvaluatorChatPrompt;
/** Variables extracted from the latest prompt and available for evaluation-rule mappings. */
variables: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface LlmAsJudgeEvaluatorVersion
extends LangfuseAPI.EvaluatorVersionBase {
/** Evaluator type. */
type: "llm_as_judge";
/** The single user chat message used during evaluation. */
/** Ordered chat messages used during evaluation. */
prompt: LangfuseAPI.EvaluatorChatPrompt;
/**
* Variables extracted from the prompt and available for evaluation-rule mappings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface UpdateLlmAsJudgeEvaluatorRequest {
description?: string | null;
/** Evaluator type. The type of an existing evaluator cannot change. */
type: "llm_as_judge";
/** Complete replacement user prompt string or a list containing exactly one user chat message. */
/** Complete replacement user prompt string or an ordered list of chat messages. */
prompt: LangfuseAPI.EvaluatorChatPromptInput;
/** Explicit model configuration. Set to `null` or omit to use the project's default evaluation model. */
modelConfig?: LangfuseAPI.EvaluatorModelConfig | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from "./Creator.js";
export * from "./EvaluatorModelConfig.js";
export * from "./EvaluatorChatMessageRole.js";
export * from "./EvaluatorChatMessage.js";
export * from "./EvaluatorChatPrompt.js";
export * from "./EvaluatorChatPromptInput.js";
Expand Down