mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-03 14:50:19 +01:00
refactor: move anthropic/llm.js over to packages/api and update imports
This commit is contained in:
parent
a50a098a6c
commit
796cb2b1ab
4 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
|
const { getLLMConfig } = require('@librechat/api');
|
||||||
const { EModelEndpoint } = require('librechat-data-provider');
|
const { EModelEndpoint } = require('librechat-data-provider');
|
||||||
const { getUserKey, checkUserKeyExpiry } = require('~/server/services/UserService');
|
const { getUserKey, checkUserKeyExpiry } = require('~/server/services/UserService');
|
||||||
const { getLLMConfig } = require('~/server/services/Endpoints/anthropic/llm');
|
|
||||||
const AnthropicClient = require('~/app/clients/AnthropicClient');
|
const AnthropicClient = require('~/app/clients/AnthropicClient');
|
||||||
|
|
||||||
const initializeClient = async ({ req, res, endpointOption, overrideModel, optionsOnly }) => {
|
const initializeClient = async ({ req, res, endpointOption, overrideModel, optionsOnly }) => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
const { getLLMConfig } = require('~/server/services/Endpoints/anthropic/llm');
|
const { getLLMConfig } = require('@librechat/api');
|
||||||
|
|
||||||
jest.mock('https-proxy-agent', () => ({
|
jest.mock('https-proxy-agent', () => ({
|
||||||
HttpsProxyAgent: jest.fn().mockImplementation((proxy) => ({ proxy })),
|
HttpsProxyAgent: jest.fn().mockImplementation((proxy) => ({ proxy })),
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
export * from './helpers';
|
export * from './helpers';
|
||||||
|
export * from './llm';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
const { ProxyAgent } = require('undici');
|
const { ProxyAgent } = require('undici');
|
||||||
const { anthropicSettings, removeNullishValues } = require('librechat-data-provider');
|
const { anthropicSettings, removeNullishValues } = require('librechat-data-provider');
|
||||||
const { checkPromptCacheSupport, getClaudeHeaders, configureReasoning } = require('@librechat/api');
|
const { checkPromptCacheSupport, getClaudeHeaders, configureReasoning } = require('./helpers');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates configuration options for creating an Anthropic language model (LLM) instance.
|
* Generates configuration options for creating an Anthropic language model (LLM) instance.
|
||||||
|
|
@ -100,4 +100,4 @@ function getLLMConfig(apiKey, options = {}) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { getLLMConfig };
|
export { getLLMConfig };
|
||||||
Loading…
Add table
Add a link
Reference in a new issue