Skip to content

Commit

Permalink
Merge branch 'main' into nm/explicit-prompt-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
nsmccandlish authored Oct 23, 2024
2 parents 5f61360 + cfa9440 commit d77eb13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions computer-use-demo/computer_use_demo/loop.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Agentic sampling loop that calls the Anthropic API and local implenmentation of anthropic-defined computer use tools.
Agentic sampling loop that calls the Anthropic API and local implementation of anthropic-defined computer use tools.
"""

import platform
Expand Down Expand Up @@ -88,7 +88,7 @@ async def sampling_loop(

while True:
enable_prompt_caching = False
betas = ["computer-use-2024-10-22"]
betas = [BETA_FLAG]
image_truncation_threshold = 10
if provider == APIProvider.ANTHROPIC:
client = Anthropic(api_key=api_key)
Expand Down
9 changes: 9 additions & 0 deletions computer-use-demo/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/bash
PYTHON_MINOR_VERSION=$(python3 --version | awk -F. '{print $2}')

if [ "$PYTHON_MINOR_VERSION" -gt 12 ]; then
echo "Python version 3.$PYTHON_MINOR_VERSION detected. Python 3.12 or lower is required for setup to complete."
echo "If you have multiple versions of Python installed, you can set the correct one by adjusting setup.sh to use a specific version, for example:"
echo "'python3 -m venv .venv' -> 'python3.12 -m venv .venv'"
exit 1
fi

if ! command -v cargo &> /dev/null; then
echo "Cargo (the package manager for Rust) is not present. This is required for one of this module's dependencies."
echo "See https://www.rust-lang.org/tools/install for installation instructions."
Expand Down
4 changes: 2 additions & 2 deletions financial-data-analyst/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ A sophisticated Next.js application that combines Claude's capabilities with int

1. Clone the repository:
```bash
git clone https://github.com/yourusername/financial-ai-assistant.git
cd financial-ai-assistant
git clone https://github.com/anthropics/anthropic-quickstarts.git
cd anthropic-quickstarts/financial-data-analyst
```

2. Install dependencies:
Expand Down

0 comments on commit d77eb13

Please sign in to comment.