mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 17:13:15 +00:00
feat: agent templates and seeding premade agents (#1910)
* feat: agent templates and seeding premade agents * fix: ensure ObjectId is used for source reference in agent configuration * fix: improve source handling in DatabaseSeeder and update tool config processing * feat: add prompt handling in DatabaseSeeder for agent configuration * Docs premade agents * link to prescraped docs * feat: add template agent retrieval and adopt agent functionality * feat: simplify agent descriptions in premade_agents.yaml added docs --------- Co-authored-by: Pavel <pabin@yandex.ru> Co-authored-by: Alex <a@tushynski.me>
This commit is contained in:
@@ -24,6 +24,7 @@ export interface Preference {
|
||||
token: string | null;
|
||||
modalState: ActiveState;
|
||||
paginatedDocuments: Doc[] | null;
|
||||
templateAgents: Agent[] | null;
|
||||
agents: Agent[] | null;
|
||||
sharedAgents: Agent[] | null;
|
||||
selectedAgent: Agent | null;
|
||||
@@ -52,6 +53,7 @@ const initialState: Preference = {
|
||||
token: localStorage.getItem('authToken') || null,
|
||||
modalState: 'INACTIVE',
|
||||
paginatedDocuments: null,
|
||||
templateAgents: null,
|
||||
agents: null,
|
||||
sharedAgents: null,
|
||||
selectedAgent: null,
|
||||
@@ -91,6 +93,9 @@ export const prefSlice = createSlice({
|
||||
setModalStateDeleteConv: (state, action: PayloadAction<ActiveState>) => {
|
||||
state.modalState = action.payload;
|
||||
},
|
||||
setTemplateAgents: (state, action) => {
|
||||
state.templateAgents = action.payload;
|
||||
},
|
||||
setAgents: (state, action) => {
|
||||
state.agents = action.payload;
|
||||
},
|
||||
@@ -114,6 +119,7 @@ export const {
|
||||
setTokenLimit,
|
||||
setModalStateDeleteConv,
|
||||
setPaginatedDocuments,
|
||||
setTemplateAgents,
|
||||
setAgents,
|
||||
setSharedAgents,
|
||||
setSelectedAgent,
|
||||
@@ -191,6 +197,8 @@ export const selectTokenLimit = (state: RootState) =>
|
||||
state.preference.token_limit;
|
||||
export const selectPaginatedDocuments = (state: RootState) =>
|
||||
state.preference.paginatedDocuments;
|
||||
export const selectTemplateAgents = (state: RootState) =>
|
||||
state.preference.templateAgents;
|
||||
export const selectAgents = (state: RootState) => state.preference.agents;
|
||||
export const selectSharedAgents = (state: RootState) =>
|
||||
state.preference.sharedAgents;
|
||||
|
||||
Reference in New Issue
Block a user