diff --git a/Makefile b/Makefile index 7ffb93fe..069b3a16 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,16 @@ install: ## Install the poetry environment and install the pre-commit hooks @cd arcade && poetry install --all-extras @cd arcade && poetry run pre-commit install + +.PHONY: install-toolkits +install-toolkits: ## Install dependencies for all toolkits + @echo "🚀 Installing dependencies for all toolkits" + @for dir in toolkits/*/ ; do \ + echo "📦 Installing dependencies for $$dir"; \ + (cd $$dir && poetry lock && poetry install); \ + done + + .PHONY: check check: ## Run code quality tools. @echo "🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry check --lock" diff --git a/arcade/arcade/cli/main.py b/arcade/arcade/cli/main.py index 1b20c729..27bf2f28 100644 --- a/arcade/arcade/cli/main.py +++ b/arcade/arcade/cli/main.py @@ -182,6 +182,7 @@ def chat( stream: bool = typer.Option( False, "-s", "--stream", is_flag=True, help="Stream the tool output." ), + prompt: str = typer.Option(None, "--prompt", help="The system prompt to use for the chat."), debug: bool = typer.Option(False, "--debug", "-d", help="Show debug information"), host: str = typer.Option( None, @@ -219,23 +220,10 @@ def chat( # start messages conversation history: list[dict[str, Any]] = [] - chat_header = Text.assemble( - "\n", - ( - "=== Arcade AI Chat ===", - "bold magenta underline", - ), - "\n", - "\n", - "Chatting with Arcade Engine at ", - ( - config.engine_url, - "bold blue", - ), - ) - if stream: - chat_header.append(" (streaming)") - console.print(chat_header) + if prompt: + history.append({"role": "system", "content": prompt}) + + display_arcade_chat_header(config, stream) # Try to hit /health endpoint on engine and warn if it is down log_engine_health(client) @@ -332,6 +320,26 @@ def config( raise typer.Exit(code=1) +def display_arcade_chat_header(config: Config, stream: bool) -> None: + chat_header = Text.assemble( + "\n", + ( + "=== Arcade AI Chat ===", + "bold magenta underline", + ), + "\n", + "\n", + "Chatting with Arcade Engine at ", + ( + config.engine_url, + "bold blue", + ), + ) + if stream: + chat_header.append(" (streaming)") + console.print(chat_header) + + def log_engine_health(client: Arcade) -> None: try: client.health.check() diff --git a/examples/fastapi/pyproject.toml b/examples/fastapi/pyproject.toml index 4e285d0d..7b606d58 100644 --- a/examples/fastapi/pyproject.toml +++ b/examples/fastapi/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_example_fastapi" version = "0.1.0" description = "FastAPI example app with Arcade" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/github/pyproject.toml b/toolkits/github/pyproject.toml index b355cd3e..d3ff5688 100644 --- a/toolkits/github/pyproject.toml +++ b/toolkits/github/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_github" version = "0.1.0" description = "LLM tools for interacting with Github" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/google/pyproject.toml b/toolkits/google/pyproject.toml index 21f60aed..6433e147 100644 --- a/toolkits/google/pyproject.toml +++ b/toolkits/google/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_google" version = "0.1.0" description = "Arcade tools for the entire google suite" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/linkedin/pyproject.toml b/toolkits/linkedin/pyproject.toml index 8c6177f9..d5da1652 100644 --- a/toolkits/linkedin/pyproject.toml +++ b/toolkits/linkedin/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_linkedin" version = "0.1.0" description = "Arcade tools for LinkedIn" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/math/pyproject.toml b/toolkits/math/pyproject.toml index 19a39089..1407c37f 100644 --- a/toolkits/math/pyproject.toml +++ b/toolkits/math/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_math" version = "0.1.0" description = "Math toolkit for Arcade" -authors = ["Arcade AI "] [tool.poetry.dependencies] diff --git a/toolkits/search/pyproject.toml b/toolkits/search/pyproject.toml index cf207f2e..65d17c96 100644 --- a/toolkits/search/pyproject.toml +++ b/toolkits/search/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_search" version = "0.1.0" description = "Tools for searching the web" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/slack/pyproject.toml b/toolkits/slack/pyproject.toml index 6558aee8..979ee6d4 100644 --- a/toolkits/slack/pyproject.toml +++ b/toolkits/slack/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_slack" version = "0.1.0" description = "Slack tools for LLMs" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/spotify/pyproject.toml b/toolkits/spotify/pyproject.toml index 9ec56366..8f99837e 100644 --- a/toolkits/spotify/pyproject.toml +++ b/toolkits/spotify/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_spotify" version = "0.1.0" description = "Arcade tools for Spotify" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/x/pyproject.toml b/toolkits/x/pyproject.toml index 5a0a49aa..5e511422 100644 --- a/toolkits/x/pyproject.toml +++ b/toolkits/x/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_x" version = "0.1.0" description = "LLM tools for interacting with X (Twitter)" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10" diff --git a/toolkits/zoom/pyproject.toml b/toolkits/zoom/pyproject.toml index d9d7d206..1db702fe 100644 --- a/toolkits/zoom/pyproject.toml +++ b/toolkits/zoom/pyproject.toml @@ -2,7 +2,7 @@ name = "arcade_zoom" version = "0.1.0" description = "Arcade tools for Zoom" -authors = ["Arcade AI "] [tool.poetry.dependencies] python = "^3.10"