Skip to content

Commit

Permalink
feat: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-dixit committed Aug 17, 2024
1 parent 59ef3b3 commit cc795dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions js/src/frameworks/vercel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ describe("Apps class tests", () => {
});

it("check if tools are coming", async () => {
const tools = await vercelAIToolSet.getTools({
const tools = await vercelAIToolSet.get_tools({
apps: ['github']
});

expect(tools).toBeInstanceOf(Array);
expect(Object.keys(tools)).toBeInstanceOf(Array);

});

it("check if tools are coming", async () => {
it("check if actions are coming", async () => {
const tools = await vercelAIToolSet.get_actions({
actions: ['GITHUB_GITHUB_API_ROOT']
});
Expand Down
7 changes: 4 additions & 3 deletions js/src/frameworks/vercel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ export class VercelAIToolSet extends BaseComposioToolSet {
return tools;
}

// change this implementation
async get_tools(filters: {
apps: Sequence<string>;
tags: Optional<Array<string>>;
useCase: Optional<string>;
apps: Array<string>;
tags?: Optional<Array<string>>;
useCase?: Optional<string>;
}): Promise<{ [key: string]: any }> {
const actionsList = await this.client.actions.list({
apps: filters.apps.join(","),
Expand Down

0 comments on commit cc795dc

Please sign in to comment.