@autobe/agent 0.5.1 → 0.6.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/lib/AutoBeAgent.js +25 -6
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +3 -3
- package/lib/context/AutoBeContext.d.ts +2 -2
- package/lib/context/IAutoBeApplicationProps.d.ts +6 -0
- package/lib/factory/createAgenticaHistory.js +1 -0
- package/lib/factory/createAgenticaHistory.js.map +1 -1
- package/lib/factory/createAutoBeApplication.js +16 -16
- package/lib/factory/createAutoBeApplication.js.map +1 -1
- package/lib/index.mjs +4608 -4644
- package/lib/index.mjs.map +1 -1
- package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.d.ts +4 -8
- package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.js +10 -2
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +9 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +3 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +1 -0
- package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.d.ts +1 -1
- package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.js +5 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -0
- package/lib/orchestrate/{orchestrateAnalyze.d.ts → analyze/orchestrateAnalyze.d.ts} +2 -2
- package/lib/orchestrate/{orchestrateAnalyze.js → analyze/orchestrateAnalyze.js} +101 -38
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/orchestrate/index.d.ts +3 -3
- package/lib/orchestrate/index.js +6 -6
- package/lib/orchestrate/index.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +5 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +3 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/transformInterfaceHistories.js +15 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +764 -915
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +7 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +10 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js +9 -0
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/structures/IAutoBeVendor.d.ts +45 -2
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +32 -3
- package/src/constants/AutoBeSystemPromptConstant.ts +3 -3
- package/src/context/AutoBeContext.ts +2 -2
- package/src/context/IAutoBeApplicationProps.ts +6 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeApplication.ts +1 -1
- package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeAgent.ts +20 -15
- package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +10 -0
- package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeReviewer.ts +7 -2
- package/src/orchestrate/{orchestrateAnalyze.ts → analyze/orchestrateAnalyze.ts} +43 -24
- package/src/orchestrate/index.ts +3 -3
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +5 -0
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +3 -0
- package/src/orchestrate/interface/transformInterfaceHistories.ts +15 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +112 -79
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +7 -0
- package/src/orchestrate/prisma/transformPrismaCorrectHistories.ts +9 -0
- package/src/orchestrate/prisma/transformPrismaHistories.ts +9 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +7 -0
- package/src/structures/IAutoBeVendor.ts +48 -2
- package/lib/analyze/AnalyzeAgent.d.ts +0 -24
- package/lib/analyze/AnalyzeAgent.js +0 -942
- package/lib/analyze/AnalyzeAgent.js.map +0 -1
- package/lib/analyze/AutoBeAnalyzeAgent.js.map +0 -1
- package/lib/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
- package/lib/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/orchestrateAnalyze.js.map +0 -1
- package/src/analyze/AnalyzeAgent.ts +0 -183
- /package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.d.ts +0 -0
- /package/lib/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.js +0 -0
- /package/src/{analyze → orchestrate/analyze}/AutoBeAnalyzeFileSystem.ts +0 -0
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import OpenAI from "openai";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* LLM service vendor for Agentica Chat.
|
|
5
|
+
*
|
|
6
|
+
* `IAgenticaVendor` is a type represents an LLM (Large Language Model) vendor
|
|
7
|
+
* of the {@link AutoBeAgent}.
|
|
8
|
+
*
|
|
9
|
+
* Currently, {@link AutoBeAgent} supports OpenAI SDK. However, it does not mean
|
|
10
|
+
* that you can use only OpenAI's GPT model in the {@link AutoBeAgent}. The
|
|
11
|
+
* OpenAI SDK is just a connection tool to the LLM vendor's API, and you can use
|
|
12
|
+
* other LLM vendors by configuring its `baseURL` and API key.
|
|
13
|
+
*
|
|
14
|
+
* Therefore, if you want to use another LLM vendor like Claude or Gemini,
|
|
15
|
+
* please configure the `baseURL` to the {@link api}, and set
|
|
16
|
+
* {@link IAutoBeProps.model schema model} as "cluade" or "gemini".
|
|
17
|
+
*
|
|
18
|
+
* @author Samchon
|
|
19
|
+
*/
|
|
20
|
+
export interface IAutoBeVendor {
|
|
21
|
+
/** OpenAI API instance. */
|
|
22
|
+
api: OpenAI;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Chat model to be used.
|
|
26
|
+
*
|
|
27
|
+
* `({}) & string` means to support third party hosting cloud(eg. openRouter,
|
|
28
|
+
* aws)
|
|
29
|
+
*/
|
|
30
|
+
model: OpenAI.ChatModel | ({} & string);
|
|
31
|
+
|
|
32
|
+
/** Options for the request. */
|
|
33
|
+
options?: OpenAI.RequestOptions | undefined;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Number of concurrent requests allowed.
|
|
37
|
+
*
|
|
38
|
+
* If you configure this property, {@link AutoBeAgent} will constrain the
|
|
39
|
+
* number of concurrent requests to the LLM vendor. If you want to share the
|
|
40
|
+
* semaphore instance with other agents, you can directly assign the
|
|
41
|
+
* {@link Semaphore} instance to this property.
|
|
42
|
+
*
|
|
43
|
+
* Otherwise, it will not limit the number of concurrent requests, and the
|
|
44
|
+
* {@link AutoBeAgent} will send requests asynchronously without any limit.
|
|
45
|
+
*
|
|
46
|
+
* @default 16
|
|
47
|
+
*/
|
|
48
|
+
semaphore?: number | undefined;
|
|
49
|
+
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
2
|
-
import { IPointer } from "tstl";
|
|
3
|
-
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
-
import { AutoBeAnalyzeReviewer } from "./AutoBeAnalyzeReviewer";
|
|
5
|
-
type Filename = string;
|
|
6
|
-
type FileContent = string;
|
|
7
|
-
export declare class AnalyzeAgent<Model extends ILlmSchema.Model> {
|
|
8
|
-
private readonly createReviewerAgentFn;
|
|
9
|
-
private readonly ctx;
|
|
10
|
-
private readonly pointer;
|
|
11
|
-
private readonly createInnerAgent;
|
|
12
|
-
private readonly fileMap;
|
|
13
|
-
constructor(createReviewerAgentFn: typeof AutoBeAnalyzeReviewer, ctx: AutoBeContext<Model>, pointer: IPointer<{
|
|
14
|
-
files: Record<Filename, FileContent>;
|
|
15
|
-
} | null>);
|
|
16
|
-
/**
|
|
17
|
-
* Conversate with planner agent
|
|
18
|
-
*
|
|
19
|
-
* @param content Conversation from user in this time.
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
conversate(content: string): Promise<string>;
|
|
23
|
-
}
|
|
24
|
-
export {};
|