-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from iceljc/features/refine-types
Features/refine types
- Loading branch information
Showing
73 changed files
with
508 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/** | ||
* @typedef {Object} AgentWelcomeInfo | ||
* @property {string[]} messages - The welcome messages in Rich content format. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} AgentTemplate | ||
* @property {string} name | ||
* @property {string} content | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} AgentLlmConfig | ||
* @property {boolean} is_inherit - Inherited from default Agent settings | ||
* @property {string?} provider | ||
* @property {string?} model | ||
* @property {number} max_recursion_depth | ||
*/ | ||
|
||
|
||
/** | ||
* @typedef {Object} RouterSettings | ||
* @property {string} planner | ||
*/ | ||
|
||
|
||
/** | ||
* @typedef {Object} AgentFilter | ||
* @property {import('$commonTypes').Pagination} pager - Pagination | ||
* @property {string} [type] | ||
* @property {boolean} [isPublic] | ||
* @property {boolean} [disabled] | ||
* @property {string[]} [agentIds] | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} AgentModel | ||
* @property {string} id - Agent Id. | ||
* @property {string} name - Agent name. | ||
* @property {string} description - Agent description. | ||
* @property {string} type - Agent type | ||
* @property {string} instruction - System prompt | ||
* @property {ChannelInstruction[]} channel_instructions - Channel instructions | ||
* @property {boolean} disabled | ||
* @property {boolean} is_public | ||
* @property {boolean} is_host | ||
* @property {boolean} allow_routing | ||
* @property {string} icon_url - Icon | ||
* @property {string[]} profiles - The agent profiles. | ||
* @property {string[]} utilities - The agent utilities. | ||
* @property {Date} created_datetime | ||
* @property {Date} updated_datetime | ||
* @property {AgentLlmConfig} llm_config - LLM settings. | ||
* @property {import('$pluginTypes').PluginDefModel} plugin | ||
* @property {FunctionDef[]} functions | ||
* @property {AgentTemplate[]} templates | ||
* @property {Object[]} responses | ||
* @property {RoutingRule[]} routing_rules | ||
* @property {AgentWelcomeInfo} welcome_info - Welcome information. | ||
* @property {boolean} editable | ||
*/ | ||
|
||
|
||
/** | ||
* @typedef {Object} AgentSettings | ||
* @property {string} dataDir | ||
* @property {string} templateFormat | ||
* @property {AgentLlmConfig} llmConfig - LLM settings. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} AgentTaskFilter | ||
* @property {import('$commonTypes').Pagination} pager - Pagination | ||
* @property {string} [agentId] - The agent id. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} AgentTaskModel | ||
* @property {string} id - Task id. | ||
* @property {string} name - Task name. | ||
* @property {string} description - Description. | ||
* @property {string} content - Task detail. | ||
* @property {boolean} enabled | ||
* @property {Date} created_datetime | ||
* @property {Date} updated_datetime | ||
* @property {string} agent_id - Description. | ||
* @property {string} agent_name - Task detail. | ||
* @property {string} [direct_agent_id] - Run task directly in this agent. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} ChannelInstruction | ||
* @property {string} channel | ||
* @property {string} instruction | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} RoutingRule | ||
* @property {string} type | ||
* @property {string} field | ||
* @property {string} description | ||
* @property {string} fieldType | ||
* @property {boolean} required | ||
* @property {string} redirectTo | ||
* @property {string?} [redirect_to_agent] | ||
*/ | ||
|
||
|
||
/** | ||
* @typedef {Object} FunctionDef | ||
* @property {string} name | ||
* @property {string} description | ||
*/ | ||
|
||
|
||
export default {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Speech | ||
/** | ||
* @typedef {Object} SpeechModel | ||
* @property {string} id | ||
* @property {SpeechSynthesis} synth | ||
* @property {SpeechSynthesisUtterance} utterThis | ||
* @property {() => void} stop | ||
* @property {() => boolean} isPlaying | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} AudioModel | ||
* @property {string} id | ||
* @property {HTMLAudioElement} player | ||
* @property {() => void} stop | ||
*/ | ||
|
||
export default {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* @typedef {Object} Pagination | ||
* @property {number} page - The plugin full name. | ||
* @property {number} size - The plugin name. | ||
* @property {number} count - Row count. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} KeyValuePair | ||
* @property {string} key - The key. | ||
* @property {string} value - The value. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} IdName | ||
* @property {string} id - The id. | ||
* @property {string} name - The name. | ||
*/ | ||
|
||
/** | ||
* @template T | ||
* @typedef {Object} PagedItems<T> | ||
* @property {number} count - Row count. | ||
* @property {T[]} items - Items. | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} LlmModelSetting | ||
* @property {string} name | ||
* @property {string} type | ||
*/ | ||
|
||
|
||
export default {}; |
Oops, something went wrong.