Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Fix github workflow

haxzie872dd4ab2354
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index adc5d8475..1f5af71bc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,7 +17,7 @@ jobs:
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
- version: 10.8.0 # Match the version in package.json
+ version: 10.8.0 # Match the version in package.json
- name: Set up Node.js
uses: actions/setup-node@v3
@@ -28,5 +28,8 @@ jobs:
- name: Install Dependencies
run: pnpm install --frozen-lockfile
+ - name: Run Linting
+ run: pnpm lint
+
- name: Run Build
run: pnpm turbo run build
diff --git a/examples/openai/src/index.ts b/examples/openai/src/index.ts
index 7c80be8ae..293ca4efc 100644
--- a/examples/openai/src/index.ts
+++ b/examples/openai/src/index.ts
@@ -1,5 +1,5 @@
-import { Composio } from "@composio/core";
-import { OpenAI } from "openai";
+import { Composio } from '@composio/core';
+import { OpenAI } from 'openai';
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
@@ -13,29 +13,29 @@ const composio = new Composio({
// Fetch all the tools from the Composio API
// these tools are automatically typed and wrapped with the OpenAI Toolset
-const tool = await composio.getTool("HACKERNEWS_GET_USER");
+const tool = await composio.getTool('HACKERNEWS_GET_USER');
const task = "Fetch the details of the user 'haxzie'";
const messages: OpenAI.ChatCompletionMessageParam[] = [
- { role: "system", content: "You are a helpful assistant that can help with tasks." },
- { role: "user", content: task },
-]
+ { role: 'system', content: 'You are a helpful assistant that can help with tasks.' },
+ { role: 'user', content: task },
+];
const response = await openai.chat.completions.create({
- model: "gpt-4o-mini",
+ model: 'gpt-4o-mini',
messages,
tools: [tool],
- tool_choice: "auto",
+ tool_choice: 'auto',
});
-
if (response.choices[0].message.tool_calls) {
try {
-
- const result = await composio.toolset.executeToolCall(response.choices[0].message.tool_calls[0]);
+ const result = await composio.toolset.executeToolCall(
+ response.choices[0].message.tool_calls[0]
+ );
console.log(JSON.stringify(result, null, 2));
} catch (error) {
console.error(JSON.stringify(error, null, 2));
}
-}
\ No newline at end of file
+}