mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-30 17:41:32 +08:00
clean up anthropic constant locations
This commit is contained in:
parent
a5488771ae
commit
997edd8de8
@ -4,14 +4,6 @@ import log from "../../services/log.js";
|
||||
import type { Request, Response } from "express";
|
||||
import { PROVIDER_CONSTANTS } from '../../services/llm/constants/provider_constants.js';
|
||||
|
||||
// Map of simplified model names to full model names with versions
|
||||
const MODEL_MAPPING: Record<string, string> = {
|
||||
'claude-3-opus': 'claude-3-opus-20240229',
|
||||
'claude-3-sonnet': 'claude-3-sonnet-20240229',
|
||||
'claude-3-haiku': 'claude-3-haiku-20240307',
|
||||
'claude-2': 'claude-2.1'
|
||||
};
|
||||
|
||||
// Interface for Anthropic model entries
|
||||
interface AnthropicModel {
|
||||
id: string;
|
||||
|
@ -4,8 +4,29 @@ export const PROVIDER_CONSTANTS = {
|
||||
BETA_VERSION: 'messages-2023-12-15',
|
||||
BASE_URL: 'https://api.anthropic.com',
|
||||
DEFAULT_MODEL: 'claude-3-haiku-20240307',
|
||||
// Model mapping for simplified model names to their full versions
|
||||
MODEL_MAPPING: {
|
||||
'claude-3.7-sonnet': 'claude-3-7-sonnet-20240620',
|
||||
'claude-3.5-haiku': 'claude-3-5-haiku-20240307',
|
||||
'claude-3-opus': 'claude-3-opus-20240229',
|
||||
'claude-3-sonnet': 'claude-3-sonnet-20240229',
|
||||
'claude-3-haiku': 'claude-3-haiku-20240307',
|
||||
'claude-2': 'claude-2.1'
|
||||
},
|
||||
// These are the currently available models from Anthropic
|
||||
AVAILABLE_MODELS: [
|
||||
{
|
||||
id: 'claude-3-7-sonnet-20240620',
|
||||
name: 'Claude 3.7 Sonnet',
|
||||
description: 'Most intelligent model with hybrid reasoning capabilities',
|
||||
maxTokens: 4096
|
||||
},
|
||||
{
|
||||
id: 'claude-3-5-haiku-20240307',
|
||||
name: 'Claude 3.5 Haiku',
|
||||
description: 'Improved version of Haiku with better performance',
|
||||
maxTokens: 4096
|
||||
},
|
||||
{
|
||||
id: 'claude-3-opus-20240229',
|
||||
name: 'Claude 3 Opus',
|
||||
|
@ -9,14 +9,6 @@ interface AnthropicMessage {
|
||||
}
|
||||
|
||||
export class AnthropicService extends BaseAIService {
|
||||
// Map of simplified model names to full model names with versions
|
||||
private static MODEL_MAPPING: Record<string, string> = {
|
||||
'claude-3-opus': 'claude-3-opus-20240229',
|
||||
'claude-3-sonnet': 'claude-3-sonnet-20240229',
|
||||
'claude-3-haiku': 'claude-3-haiku-20240307',
|
||||
'claude-2': 'claude-2.1'
|
||||
};
|
||||
|
||||
constructor() {
|
||||
super('Anthropic');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user