mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
chore: remove data-provider and use npm package instead (#713)
* chore: remove data-provider, install npm package * chore: replace monorepo package with npm package: librechat-data-provider * chore: remove data-provider scripts * chore: remove data-provider from .eslintrc.js
This commit is contained in:
parent
777d64088b
commit
369b1f4eba
46 changed files with 1403 additions and 3415 deletions
|
|
@ -1,28 +0,0 @@
|
|||
import type { TConversation, TSubmission, EModelEndpoint } from './types';
|
||||
|
||||
export default function createPayload(submission: TSubmission) {
|
||||
const { conversation, message, endpointOption } = submission;
|
||||
const { conversationId } = conversation as TConversation;
|
||||
const { endpoint } = endpointOption as { endpoint: EModelEndpoint };
|
||||
|
||||
const endpointUrlMap = {
|
||||
azureOpenAI: '/api/ask/azureOpenAI',
|
||||
openAI: '/api/ask/openAI',
|
||||
google: '/api/ask/google',
|
||||
bingAI: '/api/ask/bingAI',
|
||||
chatGPT: '/api/ask/chatGPT',
|
||||
chatGPTBrowser: '/api/ask/chatGPTBrowser',
|
||||
gptPlugins: '/api/ask/gptPlugins',
|
||||
anthropic: '/api/ask/anthropic',
|
||||
};
|
||||
|
||||
const server = endpointUrlMap[endpoint];
|
||||
|
||||
const payload = {
|
||||
...message,
|
||||
...endpointOption,
|
||||
conversationId,
|
||||
};
|
||||
|
||||
return { server, payload };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue