Skip to content

Commit

Permalink
Fix/auth docs (#933)
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> This pull request updates documentation for integrating Composio with
various frameworks, managing user connections, and using tools and
actions, while also restructuring the documentation for better clarity.
> 
>   - **Framework Integrations**:
> - Added detailed setup and usage instructions for integrating Composio
with frameworks like CrewAI, Google AI, LangChain, LangGraph,
LLamaIndex, OpenAI, Phidata, and Vercel AI.
> - Each framework section includes steps for installing packages,
importing libraries, initializing toolsets, defining agents, and
executing tasks.
>   - **Authentication and Connections**:
> - Updated documentation on creating and managing connections for
users, including OAuth and non-OAuth based apps.
>     - Added examples for connecting Gmail and Shopify accounts.
>     - Introduced admin webhooks for monitoring connected accounts.
>   - **Tools and Actions**:
> - Provided guidance on building custom actions with and without
authentication.
> - Explained how to use specific actions from tools and execute them
directly or with LLMs.
>   - **Miscellaneous**:
> - Restructured navigation in `mint.json` to improve documentation
organization.
>     - Updated quickstart guides and basic concepts documentation.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=ComposioHQ%2Fcomposio&utm_source=github&utm_medium=referral)<sup>
for 3bd731a. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
abhishekpatil4 authored Nov 30, 2024
1 parent c73f690 commit 5348a73
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
15 changes: 15 additions & 0 deletions docs/framework/openai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ async function createGithubAssistant(openai, tools) {
print(response_after_tool_calls)
```
```javascript JavaScript
//With Streaming
async function executeAssistantTask(openai, toolset, assistant, task) {
const thread = await openai.beta.threads.create();
const run = await openai.beta.threads.runs.create(thread.id, {
Expand All @@ -108,6 +109,20 @@ async function executeAssistantTask(openai, toolset, assistant, task) {
}
}

// Without Streaming
async function executeAssistantTask(openai, toolset, assistant, task) {
const thread = await openai.beta.threads.create();
const run = await openai.beta.threads.runs.create(thread.id, {
assistant_id: assistant.id,
instructions: task,
tools: tools,
model: "gpt-4o-mini",
stream: false
});
const call = await toolset.waitAndHandleAssistantToolCalls(openai, run, thread);
console.log(call);
}

(async() => {
const githubAssistant = await createGithubAssistant(openai, tools);
await executeAssistantTask(
Expand Down
2 changes: 1 addition & 1 deletion docs/javascript/cloudflare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { CloudflareToolSet } from "composio-core"

const app = new Hono();
```

</Step>

<Step title="Create an endpoint & get GitHub Tools">
Expand Down
1 change: 0 additions & 1 deletion docs/patterns/Auth/Integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ Coming Soon
</Tab>
</Tabs>


### How to Fetch Integrations

<CodeGroup>
Expand Down
6 changes: 4 additions & 2 deletions docs/patterns/tools/use-tools/use-specific-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ description: "Each Tool (like GitHub, Slack, etc.) comes with many Actions. You
`GITHUB_CREATE_AN_ISSUE` and `GITHUB_COMMIT_EVENT` are action IDs for actions in the GitHub Tool
<CodeGroup>
```python Python
from composio import ComposioToolSet, App, action
from composio_langchain import ComposioToolSet, Action

toolset = ComposioToolSet()

# can pass multiple actions
tools = toolset.get_tools(actions=[Action.GITHUB_CREATE_AN_ISSUE,Action.GITHUB_COMMIT_EVENT])
tools = toolset.get_tools(
actions=[Action.GITHUB_CREATE_AN_ISSUE]
)
```

```javascript Javascript
Expand Down

0 comments on commit 5348a73

Please sign in to comment.