Last active
March 4, 2025 04:09
-
-
Save rajivmehtaflex/28ff9aac8a176bd662650d2549f79ad2 to your computer and use it in GitHub Desktop.
AICHAT-UTILS-DESCRIPTION
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
model: mistral:mistral-small-latest | |
clients: | |
- type: gemini | |
api_key: <KEY> | |
- type: openai | |
api_key: <KEY> | |
- type: openai-compatible | |
name: mistral | |
api_base: https://api.mistral.ai/v1 | |
api_key: <KEY> | |
---------TOOLS.md------------ | |
prompt:Alwary use tools in case you find to get information is able to get from tools | |
--- | |
use_tools: all | |
--- |
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
#!/bin/bash | |
# Install VSCode Extensions | |
code --install-extension ms-python.python | |
code --install-extension ms-toolsai.jupyter | |
code --install-extension github.copilot | |
code --install-extension janisdd.vscode-edit-csv | |
code --install-extension ms-python.debugpy | |
code --install-extension ms-python.vscode-pylance | |
code --install-extension ms-toolsai.jupyter-keymap | |
code --install-extension ms-toolsai.jupyter-renderers | |
code --install-extension ms-toolsai.vscode-jupyter-cell-tags | |
code --install-extension ms-toolsai.vscode-jupyter-slideshow | |
pip install uv | |
curl https://gist.githubusercontent.com/rajivmehtaflex/d8f83f7b286fd224d66177f40c162076/raw/203b57e93c61c04290442ba5ee44cdec7edff43d/install_brew.sh | sh | |
brew install aichat jq argc | |
git clone https://github.com/sigoden/llm-functions.git | |
cd llm-functions && touch tools.txt agents.txt | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
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
from langchain.agents import create_openai_functions_agent, AgentExecutor | |
from langchain import hub | |
from langchain_openai import ChatOpenAI | |
from composio_langchain import ComposioToolSet, Action, App | |
import os | |
os.environ["OPENAI_API_KEY"] = "<key>" | |
os.environ["COMPOSIO_API_KEY"] = "<key>" | |
llm = ChatOpenAI(model="gpt-4o-mini") | |
prompt = hub.pull("hwchase17/openai-functions-agent") | |
composio_toolset = ComposioToolSet() | |
tools = composio_toolset.get_tools(actions=['GMAIL_SEND_EMAIL']) | |
agent = create_openai_functions_agent(llm, tools, prompt) | |
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True) | |
task = "send mail to [email protected] with subject: test and body: test" | |
result = agent_executor.invoke({"input": task},verbose=False) | |
print(result["output"]) |
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
from composio import ComposioToolSet, Action | |
from composio import ComposioToolSet | |
import os | |
os.environ["COMPOSIO_API_KEY"] = "<key>" | |
toolset = ComposioToolSet() | |
tool_set = ComposioToolSet(entity_id="default") | |
response=tool_set.execute_action( | |
action=Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER, | |
params={"owner": "rajivmehtaflex", "repo": "g-sample-copilot"}, | |
entity_id="default", | |
) | |
print(response) | |
print("done") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment