-
Notifications
You must be signed in to change notification settings - Fork 3
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 #17 from IdeaLeap/dev
feat: 工厂模式
- Loading branch information
Showing
290 changed files
with
4,813 additions
and
464 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.json linguist-language=JSON-with-Comments |
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 |
---|---|---|
|
@@ -131,3 +131,7 @@ docs/.vitepress/cache | |
.pnp.* | ||
package-lock.json | ||
.DS_Store | ||
|
||
temp/ | ||
etc/ | ||
package/tsdoc-metadata.json |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,12 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) | ||
|
||
## API Reference | ||
|
||
## Packages | ||
|
||
| Package | Description | | ||
| --- | --- | | ||
| [llm-ops](./llm-ops.md) | | | ||
|
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,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [(constructor)](./llm-ops.agentprompttemplate._constructor_.md) | ||
|
||
## AgentPromptTemplate.(constructor) | ||
|
||
Constructs a new instance of the `AgentPromptTemplate` class | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
constructor({ role, desc, toneStyle, communicationStyle, level, field, keyRole, reasoning, rules, reflection, memory, humanSituation, language, other, evaluate, }: AgentPromptTemplateSchema); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| { role, desc, toneStyle, communicationStyle, level, field, keyRole, reasoning, rules, reflection, memory, humanSituation, language, other, evaluate, } | [AgentPromptTemplateSchema](./llm-ops.agentprompttemplateschema.md) | | | ||
|
11 changes: 11 additions & 0 deletions
11
docs/api/llm-ops.agentprompttemplate.communicationstyle.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [communicationStyle](./llm-ops.agentprompttemplate.communicationstyle.md) | ||
|
||
## AgentPromptTemplate.communicationStyle property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
communicationStyle?: communicationStyleType; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [desc](./llm-ops.agentprompttemplate.desc.md) | ||
|
||
## AgentPromptTemplate.desc property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
desc?: string; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [evaluate](./llm-ops.agentprompttemplate.evaluate.md) | ||
|
||
## AgentPromptTemplate.evaluate property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
evaluate?: TeacherEvaluateSchema; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [field](./llm-ops.agentprompttemplate.field.md) | ||
|
||
## AgentPromptTemplate.field property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
field?: string; | ||
``` |
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,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [format](./llm-ops.agentprompttemplate.format.md) | ||
|
||
## AgentPromptTemplate.format() method | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
format(): messagesType; | ||
``` | ||
**Returns:** | ||
|
||
[messagesType](./llm-ops.messagestype.md) | ||
|
22 changes: 22 additions & 0 deletions
22
docs/api/llm-ops.agentprompttemplate.formatevaluateitem.md
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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [formatEvaluateItem](./llm-ops.agentprompttemplate.formatevaluateitem.md) | ||
|
||
## AgentPromptTemplate.formatEvaluateItem() method | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
formatEvaluateItem(items: EvaluateItemSchema[]): string; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| items | [EvaluateItemSchema](./llm-ops.evaluateitemschema.md)<!-- -->\[\] | | | ||
|
||
**Returns:** | ||
|
||
string | ||
|
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [humanSituation](./llm-ops.agentprompttemplate.humansituation.md) | ||
|
||
## AgentPromptTemplate.humanSituation property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
humanSituation?: string; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [keyRole](./llm-ops.agentprompttemplate.keyrole.md) | ||
|
||
## AgentPromptTemplate.keyRole property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
keyRole?: string; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [language](./llm-ops.agentprompttemplate.language.md) | ||
|
||
## AgentPromptTemplate.language property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
language?: languageType; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [level](./llm-ops.agentprompttemplate.level.md) | ||
|
||
## AgentPromptTemplate.level property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
level?: levelType; | ||
``` |
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,47 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) | ||
|
||
## AgentPromptTemplate class | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare class AgentPromptTemplate extends BasePromptTemplate | ||
``` | ||
**Extends:** [BasePromptTemplate](./llm-ops.baseprompttemplate.md) | ||
## Constructors | ||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)({ role, desc, toneStyle, communicationStyle, level, field, keyRole, reasoning, rules, reflection, memory, humanSituation, language, other, evaluate, })](./llm-ops.agentprompttemplate._constructor_.md) | | Constructs a new instance of the <code>AgentPromptTemplate</code> class | | ||
## Properties | ||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [communicationStyle?](./llm-ops.agentprompttemplate.communicationstyle.md) | | [communicationStyleType](./llm-ops.communicationstyletype.md) | _(Optional)_ | | ||
| [desc?](./llm-ops.agentprompttemplate.desc.md) | | string | _(Optional)_ | | ||
| [evaluate?](./llm-ops.agentprompttemplate.evaluate.md) | | [TeacherEvaluateSchema](./llm-ops.teacherevaluateschema.md) | _(Optional)_ | | ||
| [field?](./llm-ops.agentprompttemplate.field.md) | | string | _(Optional)_ | | ||
| [humanSituation?](./llm-ops.agentprompttemplate.humansituation.md) | | string | _(Optional)_ | | ||
| [keyRole?](./llm-ops.agentprompttemplate.keyrole.md) | | string | _(Optional)_ | | ||
| [language?](./llm-ops.agentprompttemplate.language.md) | | [languageType](./llm-ops.languagetype.md) | _(Optional)_ | | ||
| [level?](./llm-ops.agentprompttemplate.level.md) | | [levelType](./llm-ops.leveltype.md) | _(Optional)_ | | ||
| [memory?](./llm-ops.agentprompttemplate.memory.md) | | [MemoryPromptTemplateSchema](./llm-ops.memoryprompttemplateschema.md) | _(Optional)_ | | ||
| [other?](./llm-ops.agentprompttemplate.other.md) | | string | _(Optional)_ | | ||
| [reasoning?](./llm-ops.agentprompttemplate.reasoning.md) | | [reasoningType](./llm-ops.reasoningtype.md) | _(Optional)_ | | ||
| [reflection?](./llm-ops.agentprompttemplate.reflection.md) | | [ReflectionPromptTemplateSchema](./llm-ops.reflectionprompttemplateschema.md) | _(Optional)_ | | ||
| [returnPrompt?](./llm-ops.agentprompttemplate.returnprompt.md) | | [messagesType](./llm-ops.messagestype.md) | _(Optional)_ | | ||
| [role?](./llm-ops.agentprompttemplate.role.md) | | string | _(Optional)_ | | ||
| [rules?](./llm-ops.agentprompttemplate.rules.md) | | string \| string\[\] | _(Optional)_ | | ||
| [toneStyle?](./llm-ops.agentprompttemplate.tonestyle.md) | | [toneStyleType](./llm-ops.tonestyletype.md) | _(Optional)_ | | ||
## Methods | ||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [format()](./llm-ops.agentprompttemplate.format.md) | | | | ||
| [formatEvaluateItem(items)](./llm-ops.agentprompttemplate.formatevaluateitem.md) | | | | ||
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [memory](./llm-ops.agentprompttemplate.memory.md) | ||
|
||
## AgentPromptTemplate.memory property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
memory?: MemoryPromptTemplateSchema; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [llm-ops](./llm-ops.md) > [AgentPromptTemplate](./llm-ops.agentprompttemplate.md) > [other](./llm-ops.agentprompttemplate.other.md) | ||
|
||
## AgentPromptTemplate.other property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
other?: string; | ||
``` |
Oops, something went wrong.