-
Notifications
You must be signed in to change notification settings - Fork 0
Add method for running agent server side autonomously #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
packages/agent-sdk/src/autonomous.ts
Outdated
| @@ -0,0 +1,127 @@ | |||
| import { BitteToolResult } from "@bitte-ai/types"; | |||
|
|
|||
| const BITTE_API_URL = "https://ai-runtime-446257178793.europe-west1.run.app"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a public NPM package. Do we want this fixed URL to be here?
| agentId: string; | ||
| } | ||
|
|
||
| export interface ChatMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of these types look like they belong or already exist in @bitte-ai/types.
| const prefix = line.substring(0, 2); | ||
| const data = line.substring(2); | ||
|
|
||
| switch (prefix) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these prefixes supposed to mean?
|
I see we are depending on this old PR in https://github.com/BitteProtocol/auto-trader/blob/3098e577ecca7e629d953cf74a4f0c0b5145b7db/package.json#L15 Can we try and get it merged/released. |
packages/agent-sdk/src/autonomous.ts
Outdated
| export async function callAgent<T = Record<string, unknown>>( | ||
| accountId: string, | ||
| message: string, | ||
| agentId: string, | ||
| evmAddress: string = "", | ||
| suiAddress: string = "", | ||
| solanaAddress: string = "", | ||
| ): Promise<AgentResponse<T>> { | ||
| const chatId = `chat_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is were we want to pass system Prompt Override.
5672345 to
c648e16
Compare
20587e8 to
f3486c5
Compare
No description provided.