mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-18 16:38:10 +01:00
mcp example, mock i/o for client-to-server communications
This commit is contained in:
parent
799f0e5810
commit
7251308244
9 changed files with 343 additions and 22 deletions
|
|
@ -312,6 +312,30 @@ export const getToolCalls = (params: q.GetToolCallParams): Promise<q.ToolCallRes
|
|||
);
|
||||
};
|
||||
|
||||
export const createTool = (toolData: {
|
||||
name: string;
|
||||
description: string;
|
||||
type: 'function' | 'code_interpreter' | 'file_search';
|
||||
metadata?: Record<string, unknown>;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
type: string;
|
||||
function: {
|
||||
name: string;
|
||||
description: string;
|
||||
};
|
||||
metadata: Record<string, unknown>;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}> => {
|
||||
return request.post(
|
||||
endpoints.agents({
|
||||
path: 'tools/add',
|
||||
}),
|
||||
toolData,
|
||||
);
|
||||
};
|
||||
|
||||
/* Files */
|
||||
|
||||
export const getFiles = (): Promise<f.TFile[]> => {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export enum QueryKeys {
|
|||
banner = 'banner',
|
||||
/* Memories */
|
||||
memories = 'memories',
|
||||
mcpTools = 'mcpTools',
|
||||
}
|
||||
|
||||
export enum MutationKeys {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue