@proteinjs/conversation 1.0.7 → 1.0.8
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/.eslintrc.js +1 -1
- package/.prettierignore +4 -0
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -40
- package/dist/src/CodegenConversation.d.ts +11 -11
- package/dist/src/CodegenConversation.js +180 -294
- package/dist/src/Conversation.d.ts +49 -52
- package/dist/src/Conversation.js +288 -478
- package/dist/src/ConversationModule.d.ts +6 -6
- package/dist/src/ConversationModule.js +3 -3
- package/dist/src/Function.d.ts +4 -4
- package/dist/src/Function.js +3 -3
- package/dist/src/OpenAi.d.ts +10 -42
- package/dist/src/OpenAi.js +305 -495
- package/dist/src/Paragraph.d.ts +4 -4
- package/dist/src/Paragraph.js +17 -17
- package/dist/src/Sentence.d.ts +4 -4
- package/dist/src/Sentence.js +21 -21
- package/dist/src/code_template/Code.d.ts +15 -15
- package/dist/src/code_template/Code.js +73 -167
- package/dist/src/code_template/CodeTemplate.d.ts +11 -11
- package/dist/src/code_template/CodeTemplate.js +80 -169
- package/dist/src/code_template/CodeTemplateModule.d.ts +6 -6
- package/dist/src/code_template/CodeTemplateModule.js +26 -28
- package/dist/src/code_template/Repo.d.ts +38 -34
- package/dist/src/code_template/Repo.js +195 -291
- package/dist/src/fs/conversation_fs/ConversationFsModerator.d.ts +12 -12
- package/dist/src/fs/conversation_fs/ConversationFsModerator.js +108 -110
- package/dist/src/fs/conversation_fs/ConversationFsModule.d.ts +11 -11
- package/dist/src/fs/conversation_fs/ConversationFsModule.js +97 -204
- package/dist/src/fs/conversation_fs/FsFunctions.d.ts +62 -58
- package/dist/src/fs/conversation_fs/FsFunctions.js +252 -414
- package/dist/src/fs/git/GitModule.d.ts +8 -8
- package/dist/src/fs/git/GitModule.js +74 -163
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.d.ts +18 -16
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.js +58 -158
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.d.ts +26 -27
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.js +131 -234
- package/dist/src/fs/package/PackageFunctions.d.ts +60 -54
- package/dist/src/fs/package/PackageFunctions.js +213 -366
- package/dist/src/fs/package/PackageModule.d.ts +24 -24
- package/dist/src/fs/package/PackageModule.js +170 -292
- package/dist/src/history/MessageHistory.d.ts +12 -12
- package/dist/src/history/MessageHistory.js +46 -52
- package/dist/src/history/MessageModerator.d.ts +2 -2
- package/dist/src/history/MessageModerator.js +3 -3
- package/dist/src/template/ConversationTemplate.d.ts +8 -8
- package/dist/src/template/ConversationTemplate.js +3 -3
- package/dist/src/template/ConversationTemplateFunctions.d.ts +35 -33
- package/dist/src/template/ConversationTemplateFunctions.js +75 -176
- package/dist/src/template/ConversationTemplateModule.d.ts +48 -51
- package/dist/src/template/ConversationTemplateModule.js +116 -211
- package/dist/src/template/createApp/CreateAppTemplate.d.ts +1 -1
- package/dist/src/template/createApp/CreateAppTemplate.js +59 -151
- package/dist/src/template/createCode/CreateCodeConversationTemplate.d.ts +1 -1
- package/dist/src/template/createCode/CreateCodeConversationTemplate.js +67 -183
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.d.ts +1 -1
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.js +77 -174
- package/dist/src/template/createPackage/tsconfig.json +11 -11
- package/dist/test/createKeywordFilesIndex.test.d.ts +1 -1
- package/dist/test/createKeywordFilesIndex.test.js +41 -132
- package/dist/test/openai/openai.generateList.test.d.ts +1 -1
- package/dist/test/openai/openai.generateList.test.js +47 -136
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.d.ts +1 -1
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.js +12 -13
- package/dist/test/repo/repo.test.d.ts +1 -1
- package/dist/test/repo/repo.test.js +38 -127
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Function } from './Function';
|
|
2
2
|
import { MessageModerator } from './history/MessageModerator';
|
|
3
3
|
export interface ConversationModule {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
getName(): string;
|
|
5
|
+
getSystemMessages(): string[];
|
|
6
|
+
getFunctions(): Function[];
|
|
7
|
+
getMessageModerators(): MessageModerator[];
|
|
8
8
|
}
|
|
9
9
|
export interface ConversationModuleFactory {
|
|
10
|
-
|
|
10
|
+
createModule(repoPath: string): Promise<ConversationModule>;
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=ConversationModule.d.ts.map
|
|
12
|
+
//# sourceMappingURL=ConversationModule.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
//# sourceMappingURL=ConversationModule.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=ConversationModule.js.map
|
package/dist/src/Function.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatCompletionCreateParams } from 'openai/resources/chat';
|
|
2
2
|
export interface Function {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
definition: ChatCompletionCreateParams.Function;
|
|
4
|
+
call(obj: any): Promise<any>;
|
|
5
|
+
instructions?: string[];
|
|
6
6
|
}
|
|
7
|
-
//# sourceMappingURL=Function.d.ts.map
|
|
7
|
+
//# sourceMappingURL=Function.d.ts.map
|
package/dist/src/Function.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
//# sourceMappingURL=Function.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=Function.js.map
|
package/dist/src/OpenAi.d.ts
CHANGED
|
@@ -5,46 +5,14 @@ import { MessageHistory } from './history/MessageHistory';
|
|
|
5
5
|
import { TiktokenModel } from 'tiktoken';
|
|
6
6
|
export declare const DEFAULT_MODEL: TiktokenModel;
|
|
7
7
|
export declare class OpenAi {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
functions?: Function[],
|
|
13
|
-
messageModerators?: MessageModerator[],
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private static executeRequest;
|
|
18
|
-
private static callFunction;
|
|
19
|
-
static generateCode(
|
|
20
|
-
messages: string[],
|
|
21
|
-
model?: string,
|
|
22
|
-
history?: MessageHistory,
|
|
23
|
-
functions?: Function[],
|
|
24
|
-
messageModerators?: MessageModerator[],
|
|
25
|
-
includeSystemMessages?: boolean,
|
|
26
|
-
logLevel?: LogLevel
|
|
27
|
-
): Promise<string>;
|
|
28
|
-
static updateCode(
|
|
29
|
-
code: string,
|
|
30
|
-
description: string,
|
|
31
|
-
model?: string,
|
|
32
|
-
history?: MessageHistory,
|
|
33
|
-
functions?: Function[],
|
|
34
|
-
messageModerators?: MessageModerator[],
|
|
35
|
-
includeSystemMessages?: boolean,
|
|
36
|
-
logLevel?: LogLevel
|
|
37
|
-
): Promise<string>;
|
|
38
|
-
static updateCodeDescription(code: string, description: string): string;
|
|
39
|
-
static parseCodeFromMarkdown(code: string): string;
|
|
40
|
-
static generateList(
|
|
41
|
-
messages: string[],
|
|
42
|
-
model?: string,
|
|
43
|
-
history?: MessageHistory,
|
|
44
|
-
functions?: Function[],
|
|
45
|
-
messageModerators?: MessageModerator[],
|
|
46
|
-
includeSystemMessages?: boolean,
|
|
47
|
-
logLevel?: LogLevel
|
|
48
|
-
): Promise<string[]>;
|
|
8
|
+
static generateResponse(messages: string[], model?: string, history?: MessageHistory, functions?: Function[], messageModerators?: MessageModerator[], logLevel?: LogLevel): Promise<string>;
|
|
9
|
+
private static moderateHistory;
|
|
10
|
+
private static executeRequest;
|
|
11
|
+
private static callFunction;
|
|
12
|
+
static generateCode(messages: string[], model?: string, history?: MessageHistory, functions?: Function[], messageModerators?: MessageModerator[], includeSystemMessages?: boolean, logLevel?: LogLevel): Promise<string>;
|
|
13
|
+
static updateCode(code: string, description: string, model?: string, history?: MessageHistory, functions?: Function[], messageModerators?: MessageModerator[], includeSystemMessages?: boolean, logLevel?: LogLevel): Promise<string>;
|
|
14
|
+
static updateCodeDescription(code: string, description: string): string;
|
|
15
|
+
static parseCodeFromMarkdown(code: string): string;
|
|
16
|
+
static generateList(messages: string[], model?: string, history?: MessageHistory, functions?: Function[], messageModerators?: MessageModerator[], includeSystemMessages?: boolean, logLevel?: LogLevel): Promise<string[]>;
|
|
49
17
|
}
|
|
50
|
-
//# sourceMappingURL=OpenAi.d.ts.map
|
|
18
|
+
//# sourceMappingURL=OpenAi.d.ts.map
|