Skip to content

Commit

Permalink
Merge branch 'main' into fix-haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Feb 12, 2025
2 parents 56b3883 + 76ea5bd commit 4ea2403
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 43 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/notify-letta-cloud.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: check-yaml
exclude: 'docs/.*|tests/data/.*|configs/.*'
- id: end-of-file-fixer
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*|.*/.*\.(scss|css|html)'
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*'
- id: trailing-whitespace
exclude: 'docs/.*|tests/data/.*|letta/server/static_files/.*'

Expand All @@ -16,15 +16,18 @@ repos:
entry: bash -c '[ -d "apps/core" ] && cd apps/core; poetry run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .'
language: system
types: [python]
args: ['--remove-all-unused-imports', '--remove-unused-variables', '--in-place', '--recursive', '--ignore-init-module-imports']
- id: isort
name: isort
entry: bash -c '[ -d "apps/core" ] && cd apps/core; poetry run isort --profile black .'
language: system
types: [python]
args: ['--profile', 'black']
exclude: ^docs/
- id: black
name: black
entry: bash -c '[ -d "apps/core" ] && cd apps/core; poetry run black --line-length 140 --target-version py310 --target-version py311 .'
language: system
types: [python]
args: ['--line-length', '140', '--target-version', 'py310', '--target-version', 'py311']
exclude: ^docs/
29 changes: 11 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ letta = "letta.main:app"

[tool.poetry.dependencies]
python = "<3.14,>=3.10"
typer = {extras = ["all"], version = "^0.9.0"}
typer = ">=0.12,<1.0"
questionary = "^2.0.1"
pytz = "^2023.3.post1"
tqdm = "^4.66.1"
Expand Down
4 changes: 3 additions & 1 deletion tests/test_base_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ def test_send_message_to_agent(client, agent_obj, other_agent_obj):
found = True
break

print(f"In context messages of the sender agent (without system):\n\n{"\n".join([m.text for m in in_context_messages[1:]])}")
# Compute the joined string first
joined_messages = "\n".join([m.text for m in in_context_messages[1:]])
print(f"In context messages of the sender agent (without system):\n\n{joined_messages}")
if not found:
raise Exception(f"Was not able to find an instance of the target snippet: {target_snippet}")

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sdk_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_shared_blocks(client: LettaSDKClient):
)
assert (
"charles" in client.agents.core_memory.retrieve_block(agent_id=agent_state2.id, block_label="human").value.lower()
), f"Shared block update failed {client.agents.core_memory.retrieve_block(agent_id=agent_state2.id, block_label="human").value}"
), f"Shared block update failed {client.agents.core_memory.retrieve_block(agent_id=agent_state2.id, block_label='human').value}"

# cleanup
client.agents.delete(agent_state1.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ def adjust_menu_prices(percentage: float) -> str:
str: A formatted string summarizing the price adjustments.
"""
import cowsay
from tqdm import tqdm

from core.menu import Menu, MenuItem # Import a class from the codebase
from core.utils import format_currency # Use a utility function to test imports
from tqdm import tqdm

if not isinstance(percentage, (int, float)):
raise TypeError("percentage must be a number")
Expand Down

0 comments on commit 4ea2403

Please sign in to comment.