generated from HashWarlock/ai-agent-template-anthropic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.ts
20 lines (17 loc) · 884 Bytes
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import 'dotenv/config'
import './testSupport'
import {execute} from "./testSupport";
async function test() {
const getResult = await execute({
method: 'GET',
path: '/ipfs/CID',
queries: {
chatQuery: ["When did humans land on the moon?"],
},
secret: { anthropicApiKey: 'ANTHROPIC_API_KEY' },
headers: {},
})
console.log('GET RESULT:', JSON.parse(getResult))
console.log(`Now you are ready to publish your agent, add secrets, and interact with your agent in the following steps:\n- Execute: 'npm run publish-agent'\n- Set secrets: 'npm run set-secrets'\n- Go to the url produced by setting the secrets (e.g. https://wapo-testnet.phala.network/ipfs/QmPQJD5zv3cYDRM25uGAVjLvXGNyQf9Vonz7rqkQB52Jae?key=b092532592cbd0cf)`)
}
test().then(() => { }).catch(err => console.error(err)).finally(() => process.exit())