diff --git a/parea/cookbook/tracing_anthropic_tool_use.py b/parea/cookbook/tracing_anthropic_tool_use.py index 95066c30..ace8cb29 100644 --- a/parea/cookbook/tracing_anthropic_tool_use.py +++ b/parea/cookbook/tracing_anthropic_tool_use.py @@ -12,7 +12,7 @@ client = anthropic.Anthropic() aclient = anthropic.AsyncAnthropic() -p = Parea(api_key=os.getenv("PAREA_API_KEY"), project_name="testing") +p = Parea(api_key=os.getenv("PAREA_API_KEY")) p.wrap_anthropic_client(client) p.wrap_anthropic_client(aclient) diff --git a/parea/wrapper/anthropic/anthropic.py b/parea/wrapper/anthropic/anthropic.py index 5014da6a..4ac0bb67 100644 --- a/parea/wrapper/anthropic/anthropic.py +++ b/parea/wrapper/anthropic/anthropic.py @@ -1,6 +1,7 @@ from typing import Any, Callable, Dict, Optional, Sequence from collections import defaultdict +from copy import deepcopy from datetime import datetime from anthropic import AsyncMessageStreamManager, AsyncStream, Client, MessageStreamManager, Stream @@ -123,7 +124,7 @@ def _get_default_dict_streaming(): @staticmethod def _kwargs_to_llm_configuration(kwargs, model=None) -> LLMInputs: - functions = [d for d in kwargs.get("tools", [])] + functions = deepcopy([d for d in kwargs.get("tools", [])]) for func in functions: if "input_schema" in func: func["parameters"] = func.pop("input_schema") diff --git a/pyproject.toml b/pyproject.toml index 48724bab..5de671ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "parea-ai" packages = [{ include = "parea" }] -version = "0.2.146" +version = "0.2.147" description = "Parea python sdk" readme = "README.md" authors = ["joel-parea-ai "]