@rws-framework/ai-tools 0.2.8 → 1.0.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/package.json CHANGED
@@ -1,31 +1,26 @@
1
1
  {
2
2
  "name": "@rws-framework/ai-tools",
3
3
  "private": false,
4
- "version": "0.2.8",
4
+ "version": "1.0.0",
5
5
  "description": "",
6
6
  "main": "src/index.ts",
7
7
  "scripts": {},
8
8
  "author": "papablack",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@langchain/community": "^0.2.27",
12
- "@langchain/core": "^0.2.27",
11
+ "@langchain/community": "^0.3.28",
12
+ "@langchain/core": "^0.3.37",
13
13
  "@nestjs/common": "^10.3.2",
14
14
  "@nestjs/core": "^10.3.2",
15
15
  "@rws-framework/console": "*",
16
- "@rws-framework/server": "3.*",
17
- "langchain": "^0.2.16",
16
+ "@rws-framework/server": "^3.*",
17
+ "langchain": "^0.3.15",
18
18
  "uuid": "^9.0.0",
19
19
  "xml2js": "^0.6.2"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/xml2js": "^0.4.14"
23
23
  },
24
- "resolutions": {
25
- "@langchain/community/**/@langchain/core": "0.2.27",
26
- "@langchain/core": "0.2.27",
27
- "langchain": "0.2.16"
28
- },
29
24
  "jest": {
30
25
  "moduleFileExtensions": [
31
26
  "js",
package/src/index.ts CHANGED
@@ -4,8 +4,10 @@ import RWSConvo, { IConvoDebugXMLData, IEmbeddingsHandler, ISplitterParams } fro
4
4
  import RWSVectorStore from './models/convo/VectorStore';
5
5
  import { VectorStoreService } from './services/VectorStoreService';
6
6
  import { IContextToken } from './types/IContextToken';
7
+ import type { IAiCfg } from './types/IAiCfg';
7
8
 
8
9
  export {
10
+ IAiCfg,
9
11
  VectorStoreService,
10
12
  RWSVectorStore,
11
13
  RWSConvo,
@@ -1,6 +1,6 @@
1
1
  import 'reflect-metadata';
2
2
 
3
- import {AppConfigService, ConsoleService, RWSErrorCodes} from '@rws-framework/server';
3
+ import { ConsoleService, RWSConfigService, RWSErrorCodes} from '@rws-framework/server';
4
4
  import { InjectServices } from '@rws-framework/server/src/helpers/InjectServices';
5
5
  import RWSPrompt, { IRWSPromptJSON, ILLMChunk } from '../../models/prompts/_prompt';
6
6
  import {VectorStoreService} from '../../services/VectorStoreService';
@@ -21,6 +21,7 @@ import { v4 as uuid } from 'uuid';
21
21
  import xml2js from 'xml2js';
22
22
  import fs from 'fs';
23
23
  import path from 'path';
24
+ import { IAiCfg } from '../../types/IAiCfg';
24
25
 
25
26
 
26
27
  interface ISplitterParams {
@@ -83,7 +84,7 @@ class ConvoLoader<LLMChat extends BaseChatModel> {
83
84
  private thePrompt: RWSPrompt;
84
85
 
85
86
  vectorStoreService: VectorStoreService;
86
- configService: AppConfigService;
87
+ configService: RWSConfigService<IAiCfg>;
87
88
 
88
89
  public _baseSplitterParams: ISplitterParams;
89
90
 
@@ -0,0 +1,8 @@
1
+ import { IAppConfig } from "@rws-framework/server";
2
+
3
+ export interface IAiCfg extends IAppConfig {
4
+ aws_bedrock_region?: string;
5
+ aws_access_key?: string;
6
+ aws_secret_key?: string;
7
+ cohere_api_key?: string;
8
+ }