mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 09:37:28 +00:00
This commit introduces new components, modules, and features related to chat, sessions, and settings. It includes modifications to configuration files, updates to dependencies, adjustments to styles and layouts, and additions of new components and modules. The changes also involve updates to functions, interfaces, selectors, actions, and reducers. Additionally, there are modifications to TypeScript interfaces and types, as well as changes to parameters and functions in certain files.
18 lines
473 B
TypeScript
18 lines
473 B
TypeScript
import { URLS } from '@/services/url';
|
|
import { LangChainParams } from '@/types/langchain';
|
|
import { fetchAIFactory } from '@/utils/fetch';
|
|
|
|
/**
|
|
* 专门用于 FlowChain 的 fetch
|
|
*/
|
|
export const fetchLangChain = fetchAIFactory(
|
|
(params: LangChainParams, signal?: AbortSignal | undefined) =>
|
|
fetch(URLS.chain, {
|
|
body: JSON.stringify(params),
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
method: 'POST',
|
|
signal,
|
|
}),
|
|
);
|