-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d22783
commit 59ef3b3
Showing
6 changed files
with
108 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
import { describe, it, expect, beforeAll } from "@jest/globals"; | ||
import { CloudflareToolSet } from "./cloudflare"; | ||
import { get } from "http"; | ||
import { getTestConfig } from "../../config/getTestConfig"; | ||
|
||
|
||
describe("Apps class tests", () => { | ||
|
||
let cloudflareToolSet: CloudflareToolSet; | ||
beforeAll(() => { | ||
|
||
cloudflareToolSet = new CloudflareToolSet({ | ||
apiKey: getTestConfig().COMPOSIO_API_KEY, | ||
baseUrl: getTestConfig().BACKEND_HERMES_URL | ||
}); | ||
}); | ||
|
||
it("empty test", () => { | ||
|
||
it("check if tools are coming", async () => { | ||
const tools = await cloudflareToolSet.getActions({ | ||
actions: ['GITHUB_GITHUB_API_ROOT'] | ||
}); | ||
|
||
expect(tools.length).toBe(1); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
import { describe, it, expect, beforeAll } from "@jest/globals"; | ||
import { CloudflareToolSet } from "./cloudflare"; | ||
import { get } from "http"; | ||
import { getTestConfig } from "../../config/getTestConfig"; | ||
import { LangchainToolSet } from "./langchain"; | ||
|
||
|
||
describe("Apps class tests", () => { | ||
|
||
let langchainToolSet: LangchainToolSet; | ||
beforeAll(() => { | ||
langchainToolSet = new LangchainToolSet({ | ||
apiKey: getTestConfig().COMPOSIO_API_KEY, | ||
baseUrl: getTestConfig().BACKEND_HERMES_URL | ||
}); | ||
}); | ||
|
||
it("getools",async() => { | ||
const tools = await langchainToolSet.getTools({ | ||
apps: ['github'] | ||
}); | ||
|
||
expect(tools).toBeInstanceOf(Array); | ||
|
||
}); | ||
|
||
it("empty test", () => { | ||
it("check if tools are coming", async () => { | ||
const tools = await langchainToolSet.getActions({ | ||
actions: ['GITHUB_GITHUB_API_ROOT'] | ||
}); | ||
|
||
expect(tools.length).toBe(1); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,36 @@ | ||
import { describe, it, expect, beforeAll } from "@jest/globals"; | ||
import { CloudflareToolSet } from "./cloudflare"; | ||
import { get } from "http"; | ||
import { getTestConfig } from "../../config/getTestConfig"; | ||
import { LangchainToolSet } from "./langchain"; | ||
import { OpenAIToolSet } from "./openai"; | ||
|
||
|
||
describe("Apps class tests", () => { | ||
|
||
let openAIToolset: OpenAIToolSet; | ||
beforeAll(() => { | ||
openAIToolset = new OpenAIToolSet({ | ||
apiKey: getTestConfig().COMPOSIO_API_KEY, | ||
baseUrl: getTestConfig().BACKEND_HERMES_URL | ||
}); | ||
}); | ||
|
||
it("get tools", async () => { | ||
const tools = await openAIToolset.getTools({ | ||
apps: ['github'] | ||
}); | ||
|
||
expect(tools).toBeInstanceOf(Array); | ||
|
||
}); | ||
|
||
it("empty test", () => { | ||
it("check if tools are coming", async () => { | ||
const tools = await openAIToolset.get_actions({ | ||
actions: ['GITHUB_GITHUB_API_ROOT'] | ||
}); | ||
|
||
expect(Object.keys(tools).length).toBe(1); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
import { describe, it, expect, beforeAll } from "@jest/globals"; | ||
import { CloudflareToolSet } from "./cloudflare"; | ||
import { get } from "http"; | ||
import { getTestConfig } from "../../config/getTestConfig"; | ||
import { LangchainToolSet } from "./langchain"; | ||
import { OpenAIToolSet } from "./openai"; | ||
import { VercelAIToolSet } from "./vercel"; | ||
|
||
|
||
describe("Apps class tests", () => { | ||
|
||
let vercelAIToolSet: VercelAIToolSet; | ||
beforeAll(() => { | ||
vercelAIToolSet = new VercelAIToolSet({ | ||
apiKey: getTestConfig().COMPOSIO_API_KEY, | ||
baseUrl: getTestConfig().BACKEND_HERMES_URL | ||
}); | ||
}); | ||
|
||
it("check if tools are coming", async () => { | ||
const tools = await vercelAIToolSet.getTools({ | ||
apps: ['github'] | ||
}); | ||
|
||
expect(tools).toBeInstanceOf(Array); | ||
|
||
}); | ||
|
||
it("empty test", () => { | ||
it("check if tools are coming", async () => { | ||
const tools = await vercelAIToolSet.get_actions({ | ||
actions: ['GITHUB_GITHUB_API_ROOT'] | ||
}); | ||
|
||
expect(Object.keys(tools).length).toBe(1); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters