Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported_llm.mdx #1219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions docs/faq/supported_llms/supported_llm.mdx
Original file line number Diff line number Diff line change
@@ -12,21 +12,26 @@ By default you can use LLMs from any of the frameworks including Langchain, Llam
<Accordion title="Ollama (Open Source Models)">
<CodeGroup>
```python Python
import openai
from composio_openai import ComposioToolSet, App, Action
from openai import OpenAI
from composio_openai import ComposioToolSet, Action

openai.base_url = "http://localhost:11434/v1"
openai.api_key = 'ollama'
client = OpenAI(
base_url = 'http://localhost:11434/v1',
api_key='ollama',
)
makkor-git marked this conversation as resolved.
Show resolved Hide resolved
toolset = ComposioToolSet(api_key="COMPOSIO_API_KEY")

messages=[{'role': 'user', 'content': 'Star the repo composiohq/composio'}]

tools = toolset.get_tools(apps=[App.GITHUB])
response = openai.chat.completions.create(
model="llama3.1",
tools = toolset.get_tools(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
response = client.chat.completions.create(
model="llama3.1:8b",
messages=messages,
tools=tools,
)

result = toolset.handle_tool_calls(response)
print(result)
makkor-git marked this conversation as resolved.
Show resolved Hide resolved
```

```javascript Javascript
@@ -123,4 +128,4 @@ and make the timezone be {timezone}.
print(response)
```
</Accordion>
</AccordionGroup>
</AccordionGroup>