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

Readme Update, Dependency Fixes #7

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ We support running Agent S directly on your own system through [OpenACI](https:/
```
python examples/cli_app.py --model <MODEL>
```

This will show a user query prompt where you can enter your query and interact with Agent S.

NOTE: We currently support running Agent-S on local system only for MacOS and Ubuntu through OpenACI.

## 🙌 Contributors

We’re grateful to all the amazing people who have contributed to this project. Thank you! 🙏
Expand Down
3 changes: 0 additions & 3 deletions agent_s/MultimodalAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
LMMEnginevLLM,
LMMEngineAnthropic,
LMMEngineQwen,
LMMEngineTogether
)
import base64
import re
Expand Down Expand Up @@ -39,8 +38,6 @@ def __init__(self, engine_params=None, system_prompt=None, engine=None):
self.engine = LMMEngineOpenAI(**engine_params)
elif engine_type == "anthropic":
self.engine = LMMEngineAnthropic(**engine_params)
elif engine_type == "together":
self.engine = LMMEngineTogether(**engine_params)
elif engine_type == "azure":
self.engine = LMMEngineAzureOpenAI(**engine_params)
elif engine_type == "vllm":
Expand Down
26 changes: 0 additions & 26 deletions agent_s/MultimodalEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
)

from anthropic import Anthropic
from together import Together

import requests
from PIL import Image
Expand Down Expand Up @@ -93,31 +92,6 @@ def generate(self, messages, temperature=0., max_new_tokens=None, **kwargs):
**kwargs,
).choices[0].message.content

class LMMEngineTogether(LMMEngine):
def __init__(self, api_key=None, model=None, rate_limit=-1, **kwargs):
assert model is not None, "model must be provided"
self.model = model

api_key = api_key or os.getenv("TOGETHER_API_KEY")
if api_key is None:
raise ValueError("An API Key needs to be provided in either the api_key parameter or as an environment variable named TOGETHER_API_KEY")

self.api_key = api_key
self.request_interval = 0 if rate_limit == -1 else 60.0 / rate_limit

self.llm_client = Together(api_key=self.api_key)

def generate(self, messages, temperature=0., max_new_tokens=None, **kwargs):
'''Generate the next message based on previous messages'''
return self.llm_client.chat.completions.create(
model=self.model,
messages=messages,
max_tokens=max_new_tokens if max_new_tokens else 4096,
temperature=temperature,
stop=["<|eot_id|>","<|eom_id|>"],
**kwargs,
).choices[0].message.content

class LMMEngineAnthropic(LMMEngine):
def __init__(
self,
Expand Down
2 changes: 2 additions & 0 deletions agent_s/kb/openaci/formulate_query.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
{
"change the vscode theme to something light": "How to change to a light theme in VS Code on MacOS?",
"change the vscode theme to something light ": "How to change the theme to a light mode in Visual Studio Code on MacOS?"
}
2 changes: 1 addition & 1 deletion agent_s/kb/openaci/graph_agent_dags.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"disable autosave please": "{\"nodes\":[{\"name\":\"Open Settings\",\"info\":\"Click on the Code menu in the top menu bar. Select Preferences, then Settings. Alternatively, use the shortcut Cmd + ,.\"},{\"name\":\"Search for Auto Save\",\"info\":\"In the Settings editor, type \\\"autosave\\\" into the search bar.\"},{\"name\":\"Disable Auto Save\",\"info\":\"Find the setting labeled Files: Auto Save. Click on the dropdown menu next to it and select off.\"}],\"edges\":[[{\"name\":\"Open Settings\",\"info\":\"Click on the Code menu in the top menu bar. Select Preferences, then Settings. Alternatively, use the shortcut Cmd + ,.\"},{\"name\":\"Search for Auto Save\",\"info\":\"In the Settings editor, type \\\"autosave\\\" into the search bar.\"}],[{\"name\":\"Search for Auto Save\",\"info\":\"In the Settings editor, type \\\"autosave\\\" into the search bar.\"},{\"name\":\"Disable Auto Save\",\"info\":\"Find the setting labeled Files: Auto Save. Click on the dropdown menu next to it and select off.\"}]]}"}
{"disable autosave please": "{\"nodes\":[{\"name\":\"Open Settings\",\"info\":\"Click on the Code menu in the top menu bar. Select Preferences, then Settings. Alternatively, use the shortcut Cmd + ,.\"},{\"name\":\"Search for Auto Save\",\"info\":\"In the Settings editor, type \\\"autosave\\\" into the search bar.\"},{\"name\":\"Disable Auto Save\",\"info\":\"Find the setting labeled Files: Auto Save. Click on the dropdown menu next to it and select off.\"}],\"edges\":[[{\"name\":\"Open Settings\",\"info\":\"Click on the Code menu in the top menu bar. Select Preferences, then Settings. Alternatively, use the shortcut Cmd + ,.\"},{\"name\":\"Search for Auto Save\",\"info\":\"In the Settings editor, type \\\"autosave\\\" into the search bar.\"}],[{\"name\":\"Search for Auto Save\",\"info\":\"In the Settings editor, type \\\"autosave\\\" into the search bar.\"},{\"name\":\"Disable Auto Save\",\"info\":\"Find the setting labeled Files: Auto Save. Click on the dropdown menu next to it and select off.\"}]]}", "change the vscode theme to something light ": "{\"nodes\":[{\"name\":\"Open Command Palette\",\"info\":\"Press `Cmd + Shift + P` to open the Command Palette.\"},{\"name\":\"Select Color Theme\",\"info\":\"Type \\\"Preferences: Color Theme\\\" and select it from the list.\"},{\"name\":\"Choose Light Theme\",\"info\":\"Browse through the list of themes and select a light theme, such as \\\"Light (Visual Studio)\\\" or \\\"Solarized Light.\\\"\"}],\"edges\":[[{\"name\":\"Open Command Palette\",\"info\":\"Press `Cmd + Shift + P` to open the Command Palette.\"},{\"name\":\"Select Color Theme\",\"info\":\"Type \\\"Preferences: Color Theme\\\" and select it from the list.\"}],[{\"name\":\"Select Color Theme\",\"info\":\"Type \\\"Preferences: Color Theme\\\" and select it from the list.\"},{\"name\":\"Choose Light Theme\",\"info\":\"Browse through the list of themes and select a light theme, such as \\\"Light (Visual Studio)\\\" or \\\"Solarized Light.\\\"\"}]]}"}
2 changes: 1 addition & 1 deletion agent_s/kb/openaci/graph_agent_plans.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"disable autosave please": "To disable autosave in Visual Studio Code on macOS, follow these steps:\n\n1. **Open Settings**:\n - Click on the **Code** menu in the top menu bar.\n - Select **Preferences**, then **Settings**. Alternatively, use the shortcut **Cmd + ,**.\n\n2. **Search for Auto Save**:\n - In the Settings editor, type \"autosave\" into the search bar.\n\n3. **Disable Auto Save**:\n - Find the setting labeled **Files: Auto Save**.\n - Click on the dropdown menu next to it and select **off**.\n\nThese steps will disable the auto-save feature, requiring manual saving of files."}
{"disable autosave please": "To disable autosave in Visual Studio Code on macOS, follow these steps:\n\n1. **Open Settings**:\n - Click on the **Code** menu in the top menu bar.\n - Select **Preferences**, then **Settings**. Alternatively, use the shortcut **Cmd + ,**.\n\n2. **Search for Auto Save**:\n - In the Settings editor, type \"autosave\" into the search bar.\n\n3. **Disable Auto Save**:\n - Find the setting labeled **Files: Auto Save**.\n - Click on the dropdown menu next to it and select **off**.\n\nThese steps will disable the auto-save feature, requiring manual saving of files.", "change the vscode theme to something light ": "To change the VSCode theme to a light theme, follow these steps:\n\n1. **Open Command Palette**: Press `Cmd + Shift + P` to open the Command Palette.\n\n2. **Select Color Theme**: Type \"Preferences: Color Theme\" and select it from the list.\n\n3. **Choose Light Theme**: Browse through the list of themes and select a light theme, such as \"Light (Visual Studio)\" or \"Solarized Light.\"\n\nThese steps will change the theme to a light one in the shortest time possible."}
1 change: 1 addition & 0 deletions agent_s/kb/openaci/perplexica_rag_knowledge.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"change the vscode theme to something light ": "Changing the theme to light mode in Visual Studio Code on macOS can be done easily through the settings. Here\u2019s a step-by-step guide on how to do it:\n\n1. **Open Settings**: You can access the settings by clicking on the gear icon (\u2699\ufe0f) located in the lower-left corner of the window or by using the shortcut `Cmd + ,`.\n\n2. **Navigate to Themes**: In the settings menu, search for \"Theme\" or navigate to the \"Themes\" section. You will find options related to color themes.\n\n3. **Select Color Theme**: Once in the \"Themes\" section, you can select \"Color Theme.\" This will display a list of available themes. You can browse through the themes and select a light theme from the options provided. Popular light themes include \"Light (Visual Studio)\" or \"Solarized Light\" among others [8][10].\n\n4. **Auto Switching (Optional)**: If you want Visual Studio Code to automatically switch between light and dark themes based on your macOS system settings, you can enable the \"window.autoDetectColorScheme\" setting. This allows VS Code to listen to changes in the OS's color scheme and adjust accordingly [9][12].\n\n5. **Using Command Palette**: Alternatively, you can quickly switch themes by opening the Command Palette with `Cmd + Shift + P`, then typing \"Preferences: Color Theme\" and selecting your desired light theme from the list that appears [6][7].\n\nBy following these steps, you can easily switch to a light theme in Visual Studio Code on macOS, enhancing your coding experience according to your visual preference."
}
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
'together',
'scikit-learn',
'websockets',
'tiktoken'
'tiktoken',
'pyobjc; platform_system == "Darwin"',
'together',
'pyautogui'
],
classifiers=[
'Programming Language :: Python :: 3',
Expand Down