mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-03 06:40:20 +01:00
Merge branch 'dev' into feat/Multitenant-login-OIDC
This commit is contained in:
commit
edaa357e9d
26 changed files with 2362 additions and 16 deletions
|
|
@ -187,6 +187,8 @@ export const agents = ({ path = '', options }: { path?: string; options?: object
|
|||
return url;
|
||||
};
|
||||
|
||||
export const revertAgentVersion = (agent_id: string) => `${agents({ path: `${agent_id}/revert` })}`;
|
||||
|
||||
export const files = () => '/api/files';
|
||||
|
||||
export const images = () => `${files()}/images`;
|
||||
|
|
|
|||
|
|
@ -431,6 +431,14 @@ export const listAgents = (params: a.AgentListParams): Promise<a.AgentListRespon
|
|||
);
|
||||
};
|
||||
|
||||
export const revertAgentVersion = ({
|
||||
agent_id,
|
||||
version_index,
|
||||
}: {
|
||||
agent_id: string;
|
||||
version_index: number;
|
||||
}): Promise<a.Agent> => request.post(endpoints.revertAgentVersion(agent_id), { version_index });
|
||||
|
||||
/* Tools */
|
||||
|
||||
export const getAvailableAgentTools = (): Promise<s.TPlugin[]> => {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ export enum MutationKeys {
|
|||
updateAgentAction = 'updateAgentAction',
|
||||
deleteAction = 'deleteAction',
|
||||
deleteAgentAction = 'deleteAgentAction',
|
||||
revertAgentVersion = 'revertAgentVersion',
|
||||
deleteUser = 'deleteUser',
|
||||
updateRole = 'updateRole',
|
||||
enableTwoFactor = 'enableTwoFactor',
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ export type Agent = {
|
|||
hide_sequential_outputs?: boolean;
|
||||
artifacts?: ArtifactModes;
|
||||
recursion_limit?: number;
|
||||
version?: number;
|
||||
};
|
||||
|
||||
export type TAgentsMap = Record<string, Agent | undefined>;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,20 @@ export type UpdateAgentVariables = {
|
|||
data: AgentUpdateParams;
|
||||
};
|
||||
|
||||
export type UpdateAgentMutationOptions = MutationOptions<Agent, UpdateAgentVariables>;
|
||||
export type DuplicateVersionError = Error & {
|
||||
statusCode?: number;
|
||||
details?: {
|
||||
duplicateVersion?: any;
|
||||
versionIndex?: number
|
||||
}
|
||||
};
|
||||
|
||||
export type UpdateAgentMutationOptions = MutationOptions<
|
||||
Agent,
|
||||
UpdateAgentVariables,
|
||||
unknown,
|
||||
DuplicateVersionError
|
||||
>;
|
||||
|
||||
export type DuplicateAgentBody = {
|
||||
agent_id: string;
|
||||
|
|
@ -159,6 +172,13 @@ export type DeleteAgentActionVariables = {
|
|||
|
||||
export type DeleteAgentActionOptions = MutationOptions<void, DeleteAgentActionVariables>;
|
||||
|
||||
export type RevertAgentVersionVariables = {
|
||||
agent_id: string;
|
||||
version_index: number;
|
||||
};
|
||||
|
||||
export type RevertAgentVersionOptions = MutationOptions<Agent, RevertAgentVersionVariables>;
|
||||
|
||||
export type DeleteConversationOptions = MutationOptions<
|
||||
types.TDeleteConversationResponse,
|
||||
types.TDeleteConversationRequest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue