28 lines
717 B
JavaScript
28 lines
717 B
JavaScript
|
|
// Finish/stop reason enums. Pure data — mapping LOGIC lives in concerns/finishReason.js.
|
||
|
|
|
||
|
|
// OpenAI finish_reason values (the hub format; shared across all response translators).
|
||
|
|
export const OPENAI_FINISH = {
|
||
|
|
STOP: "stop",
|
||
|
|
LENGTH: "length",
|
||
|
|
TOOL_CALLS: "tool_calls",
|
||
|
|
CONTENT_FILTER: "content_filter",
|
||
|
|
};
|
||
|
|
|
||
|
|
// Claude stop_reason values.
|
||
|
|
export const CLAUDE_STOP = {
|
||
|
|
END_TURN: "end_turn",
|
||
|
|
MAX_TOKENS: "max_tokens",
|
||
|
|
TOOL_USE: "tool_use",
|
||
|
|
STOP_SEQUENCE: "stop_sequence",
|
||
|
|
};
|
||
|
|
|
||
|
|
// Gemini finishReason values.
|
||
|
|
export const GEMINI_FINISH = {
|
||
|
|
STOP: "STOP",
|
||
|
|
MAX_TOKENS: "MAX_TOKENS",
|
||
|
|
SAFETY: "SAFETY",
|
||
|
|
RECITATION: "RECITATION",
|
||
|
|
BLOCKLIST: "BLOCKLIST",
|
||
|
|
PROHIBITED_CONTENT: "PROHIBITED_CONTENT",
|
||
|
|
};
|