@rws-framework/ai-tools 0.0.10 → 0.1.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/ai-tools",
3
3
  "private": false,
4
- "version": "0.0.10",
4
+ "version": "0.1.0",
5
5
  "description": "",
6
6
  "main": "src/index.ts",
7
7
  "scripts": {},
@@ -13,7 +13,7 @@
13
13
  "@nestjs/common": "^10.3.2",
14
14
  "@nestjs/core": "^10.3.2",
15
15
  "@rws-framework/console": "*",
16
- "@rws-framework/server": "3.3.0-beta",
16
+ "@rws-framework/server": "3.3.1-beta",
17
17
  "langchain": "^0.2.16",
18
18
  "uuid": "^9.0.0",
19
19
  "xml2js": "^0.6.2"
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import RWSPrompt, { ILLMChunk, IRWSPromptRequestExecutor, IRWSSinglePromptRequestExecutor, IRWSPromptStreamExecutor, IChainCallOutput, IRWSPromptJSON, ChainStreamType } from './models/prompts/_prompt';
2
+ import RWSPrompt, { ILLMChunk, IRWSPromptRequestExecutor, IRWSSinglePromptRequestExecutor, IRWSPromptStreamExecutor, IChainCallOutput, IRWSPromptJSON, ChainStreamType } from '@rws-framework/ai-tools/src/models/prompts/_prompt';
3
3
  import RWSConvo, { IConvoDebugXMLData, IEmbeddingsHandler, ISplitterParams } from './models/convo/ConvoLoader';
4
4
  import RWSVectorStore from './models/convo/VectorStore';
5
5
  import { VectorStoreService } from './services/VectorStoreService';
@@ -2,10 +2,9 @@ import 'reflect-metadata';
2
2
 
3
3
  import {AppConfigService, ConsoleService, RWSErrorCodes} from '@rws-framework/server';
4
4
  import { InjectServices } from '@rws-framework/server/src/helpers/InjectServices';
5
-
6
- import RWSPrompt, { IRWSPromptJSON, ILLMChunk } from '../prompts/_prompt';
5
+ import RWSPrompt, { IRWSPromptJSON, ILLMChunk } from '../../models/prompts/_prompt';
7
6
  import {VectorStoreService} from '../../services/VectorStoreService';
8
- import RWSVectorStore, { VectorDocType } from './VectorStore';
7
+ import RWSVectorStore, { VectorDocType } from '../../models/convo/VectorStore';
9
8
 
10
9
  import { Document } from 'langchain/document';
11
10
  import { BaseChain, ConversationChain } from 'langchain/chains';
@@ -18,8 +17,8 @@ import { RunnableConfig, Runnable } from '@langchain/core/runnables';
18
17
  import { BaseMessage } from '@langchain/core/messages';
19
18
  import { ChainValues } from '@langchain/core/utils/types';
20
19
 
21
- import { v4 as uuid } from 'uuid';
22
- import xml2js from 'xml2js';
20
+ import { v4 as uuid } from '@types/uuid';
21
+ import xml2js from '@types/xml2js';
23
22
  import fs from 'fs';
24
23
  import path from 'path';
25
24
 
@@ -1,10 +1,9 @@
1
1
  import { Readable } from 'stream';
2
2
  import { PromptTemplate } from '@langchain/core/prompts';
3
- import ConvoLoader, { IChainCallOutput } from '../convo/ConvoLoader';
3
+ import ConvoLoader, { IChainCallOutput } from '../../models/convo/ConvoLoader';
4
4
  import { BedrockChat } from '@langchain/community/chat_models/bedrock/web';
5
5
  import { IterableReadableStream } from '@langchain/core/utils/stream';
6
6
  import { ChainValues } from '@langchain/core/utils/types';
7
-
8
7
  import { IContextToken } from '../../types/IContextToken';
9
8
  import { BaseChatModel } from '@langchain/core/language_models/chat_models';
10
9