agent0-js 0.0.2 → 0.0.3
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 +1 -1
- package/src/index.ts +1 -1
- package/src/types.ts +4 -8
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ export class Agent0 {
|
|
|
10
10
|
this.baseUrl = config.baseUrl || 'https://app.agent0.com'; // Default URL, can be overridden
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
private async fetchApi(endpoint: string, body:
|
|
13
|
+
private async fetchApi(endpoint: string, body: unknown): Promise<Response> {
|
|
14
14
|
const url = `${this.baseUrl}${endpoint}`;
|
|
15
15
|
|
|
16
16
|
const headers = {
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ModelMessage } from "ai";
|
|
2
2
|
|
|
3
3
|
export interface Agent0Config {
|
|
4
4
|
apiKey: string;
|
|
@@ -10,11 +10,7 @@ export interface RunOptions {
|
|
|
10
10
|
variables?: Record<string, string>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export interface Message {
|
|
14
|
-
role: 'assistatnt'
|
|
15
|
-
content: StepResult<ToolSet>["content"];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
export interface GenerateResponse {
|
|
19
|
-
messages:
|
|
20
|
-
|
|
14
|
+
messages: ModelMessage[];
|
|
15
|
+
text: string;
|
|
16
|
+
}
|