medpromptjs 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +16 -5
- package/dist/chain.d.ts +11 -6
- package/dist/{llm_loop/base.d.ts → llm_loop.d.ts} +11 -10
- package/dist/medpromptjs.cjs.development.js +380 -469
- package/dist/medpromptjs.cjs.development.js.map +1 -1
- package/dist/medpromptjs.cjs.production.min.js +1 -1
- package/dist/medpromptjs.cjs.production.min.js.map +1 -1
- package/dist/medpromptjs.esm.js +381 -470
- package/dist/medpromptjs.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/agent.ts +69 -13
- package/src/chain.ts +49 -22
- package/src/{llm_loop/base.ts → llm_loop.ts} +87 -24
- package/dist/llm_loop/index.d.ts +0 -4
- package/dist/llm_loop/map_doc.d.ts +0 -6
- package/dist/llm_loop/map_query.d.ts +0 -6
- package/dist/llm_loop/reduce.d.ts +0 -6
- package/src/llm_loop/index.ts +0 -4
- package/src/llm_loop/map_doc.ts +0 -19
- package/src/llm_loop/map_query.ts +0 -14
- package/src/llm_loop/reduce.ts +0 -25
package/dist/agent.d.ts
CHANGED
|
@@ -13,17 +13,28 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { PromptTemplate } from '@langchain/core/prompts';
|
|
17
16
|
import { LLM } from '@langchain/core/language_models/llms';
|
|
18
17
|
import type { ToolInterface } from '@langchain/core/tools';
|
|
19
18
|
export declare class BaseAgent {
|
|
20
19
|
container: any;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
private _name;
|
|
21
|
+
private _description;
|
|
22
|
+
private _template;
|
|
23
|
+
private _tools;
|
|
24
|
+
prompt: any;
|
|
24
25
|
llm: LLM;
|
|
25
|
-
|
|
26
|
+
chat_model: boolean;
|
|
27
|
+
runnable: any;
|
|
26
28
|
constructor(container: any);
|
|
29
|
+
get name(): string;
|
|
30
|
+
set name(value: string);
|
|
31
|
+
get description(): string;
|
|
32
|
+
set description(value: string);
|
|
33
|
+
get template(): string;
|
|
34
|
+
set template(value: string);
|
|
35
|
+
get tools(): ToolInterface[];
|
|
36
|
+
set tools(value: ToolInterface[]);
|
|
37
|
+
initialize(): void;
|
|
27
38
|
resolve(name: string): any;
|
|
28
39
|
camelize(str: string): string;
|
|
29
40
|
snake_case(str: string): string;
|
package/dist/chain.d.ts
CHANGED
|
@@ -14,18 +14,23 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { LLM } from '@langchain/core/language_models/llms';
|
|
17
|
-
import type { ToolInterface } from '@langchain/core/tools';
|
|
18
17
|
export declare class BaseChain {
|
|
19
18
|
container: any;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
private _name;
|
|
20
|
+
private _description;
|
|
21
|
+
private _template;
|
|
23
22
|
prompt: any;
|
|
24
23
|
llm: LLM;
|
|
25
|
-
template: string;
|
|
26
24
|
chat_model: boolean;
|
|
27
25
|
runnable: any;
|
|
28
|
-
constructor(container: any
|
|
26
|
+
constructor(container: any);
|
|
27
|
+
get name(): string;
|
|
28
|
+
set name(value: string);
|
|
29
|
+
get description(): string;
|
|
30
|
+
set description(value: string);
|
|
31
|
+
get template(): string;
|
|
32
|
+
set template(value: string);
|
|
33
|
+
initialize(): void;
|
|
29
34
|
resolve(name: string): any;
|
|
30
35
|
camelize(str: string): string;
|
|
31
36
|
snake_case(str: string): string;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { BaseChain } from '
|
|
2
|
-
import { MapQuery } from './map_query';
|
|
3
|
-
import { ReduceChain } from './reduce';
|
|
4
|
-
import { MapDoc } from './map_doc';
|
|
1
|
+
import { BaseChain } from './chain';
|
|
5
2
|
export declare class LLMLoop extends BaseChain {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
stringExpression: string;
|
|
4
|
+
_mapQueryTemplate: string;
|
|
5
|
+
_mapDocTemplate: string;
|
|
6
|
+
_reduceChainTemplate: string;
|
|
7
|
+
get mapQueryTemplate(): string;
|
|
8
|
+
set mapQueryTemplate(template: string);
|
|
9
|
+
get mapDocTemplate(): string;
|
|
10
|
+
set mapDocTemplate(template: string);
|
|
11
|
+
get reduceChainTemplate(): string;
|
|
12
|
+
set reduceChainTemplate(template: string);
|
|
12
13
|
checkAssertion(expression: string, context: any): Promise<boolean>;
|
|
13
14
|
checkMention(expression: string, context: any): Promise<boolean>;
|
|
14
15
|
checkNegation(expression: string, context: any): Promise<boolean>;
|