medpromptjs 0.2.2 → 0.3.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 CHANGED
@@ -13,9 +13,9 @@
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
- import { LLM } from "langchain/llms/base";
18
- import type { ToolInterface } from "@langchain/core/tools";
16
+ import { PromptTemplate } from '@langchain/core/prompts';
17
+ import { LLM } from '@langchain/core/language_models/llms';
18
+ import type { ToolInterface } from '@langchain/core/tools';
19
19
  export declare class BaseAgent {
20
20
  container: any;
21
21
  tools: ToolInterface[];
package/dist/chain.d.ts CHANGED
@@ -13,20 +13,21 @@
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
- import { LLM } from "langchain/llms/base";
18
- import type { ToolInterface } from "@langchain/core/tools";
16
+ import { LLM } from '@langchain/core/language_models/llms';
17
+ import type { ToolInterface } from '@langchain/core/tools';
19
18
  export declare class BaseChain {
20
19
  container: any;
21
20
  tools: ToolInterface[];
22
21
  name: string;
23
22
  description: string;
24
- prompt: PromptTemplate;
23
+ prompt: any;
25
24
  llm: LLM;
26
25
  template: string;
26
+ chat_model: boolean;
27
+ runnable: any;
27
28
  constructor(container: any, name: string, description: string, template?: string);
28
29
  resolve(name: string): any;
29
30
  camelize(str: string): string;
30
31
  snake_case(str: string): string;
31
- chain(input: any): Promise<string>;
32
+ chain(input: any): Promise<any>;
32
33
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { BaseChain } from "./chain";
1
+ export { BaseChain } from './chain';
2
2
  export { BaseAgent } from './agent';
3
3
  export { BaseTool } from './tool';
@@ -0,0 +1,21 @@
1
+ import { BaseChain } from '../chain';
2
+ import { MapQuery } from './map_query';
3
+ import { ReduceChain } from './reduce';
4
+ import { MapDoc } from './map_doc';
5
+ export declare class LLMLoop extends BaseChain {
6
+ string_expression: string;
7
+ name: string;
8
+ description: string;
9
+ mapQuery: MapQuery;
10
+ mapDoc: MapDoc;
11
+ reduceChain: ReduceChain;
12
+ checkAssertion(expression: string, context: string): Promise<boolean>;
13
+ checkMention(expression: string, context: string): Promise<boolean>;
14
+ checkNegation(expression: string, context: string): Promise<boolean>;
15
+ findDatesAndConvertToTimeElapsed(text: string): string;
16
+ camelToString(camelCase: string): string;
17
+ stringToBoolean(str: string): boolean;
18
+ textSplitter(text: string, chunkSize?: number, chunkOverlap?: number): Promise<string[]>;
19
+ printValues(obj: any): string;
20
+ chain(input: any): Promise<boolean>;
21
+ }
@@ -0,0 +1 @@
1
+ export { MapQuery } from './map_query';
@@ -0,0 +1,6 @@
1
+ import { BaseChain } from '../chain';
2
+ export declare class MapDoc extends BaseChain {
3
+ name: string;
4
+ description: string;
5
+ template: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseChain } from '../chain';
2
+ export declare class MapQuery extends BaseChain {
3
+ name: string;
4
+ description: string;
5
+ template: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseChain } from '../chain';
2
+ export declare class ReduceChain extends BaseChain {
3
+ name: string;
4
+ description: string;
5
+ template: string;
6
+ }