Using Composio With Together AI
pip install together composio-togetherai
TOGETHER_API_KEY
export TOGETHER_API_KEY=*** export COMPOSIO_API_KEY=***
from composio_togetherai import ComposioToolSet, App from together import Together client = Together() toolset = ComposioToolSet()
request = toolset.initiate_connection(app=App.GITHUB) print(f"Open this URL to authenticate: {request.redirectUrl}")
tools = toolset.get_tools(apps=[App.GITHUB])
response = client.chat.completions.create( tools=tools, model="meta-llama/Llama-3.3-70B-Instruct-Turbo", messages=[ { "role": "user", "content": "Star the repo 'togethercomputer/together-cookbook'", } ], ) res = toolset.handle_tool_calls(response) print(res)
Was this page helpful?