@agentica/chat 0.21.0 → 0.23.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/README.md CHANGED
@@ -26,7 +26,7 @@ Are you a TypeScript developer? Then you're already an AI developer. Familiar wi
26
26
  <!-- eslint-skip -->
27
27
 
28
28
  ```typescript
29
- import { Agentica, assertHttpLlmApplication } from "@agentica/core";
29
+ import { Agentica, assertHttpController } from "@agentica/core";
30
30
  import OpenAI from "openai";
31
31
  import typia from "typia";
32
32
 
@@ -40,24 +40,23 @@ const agent = new Agentica({
40
40
  controllers: [
41
41
  // functions from TypeScript class
42
42
  {
43
- protocol: "http",
43
+ protocol: "class",
44
+ name: "filesystem",
44
45
  application: typia.llm.application<MobileFileSystem, "chatgpt">(),
45
46
  execute: new MobileFileSystem(),
46
47
  },
47
48
  // functions from Swagger/OpenAPI
48
- {
49
- protocol: "http",
50
- application: assertHttpLlmApplication({
51
- model: "chatgpt",
52
- document: await fetch(
53
- "https://shopping-be.wrtn.ai/editor/swagger.json",
54
- ).then(r => r.json()),
55
- }),
49
+ assertHttpController({
50
+ name: "shopping",
51
+ model: "chatgpt",
52
+ document: await fetch(
53
+ "https://shopping-be.wrtn.ai/editor/swagger.json",
54
+ ).then(r => r.json()),
56
55
  connection: {
57
56
  host: "https://shopping-be.wrtn.ai",
58
57
  headers: { Authorization: "Bearer ********" },
59
58
  },
60
- },
59
+ }),
61
60
  ],
62
61
  });
63
62
  await agent.conversate("I wanna buy MacBook Pro");