Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix hello_world.py example for latest Anthropic SDK

James Murdza7087d213102e
diff --git a/apps/web/src/app/(docs)/docs/hello-world/py/page.mdx b/apps/web/src/app/(docs)/docs/hello-world/py/page.mdx
index 40bdda1f1..ef95e6d97 100644
--- a/apps/web/src/app/(docs)/docs/hello-world/py/page.mdx
+++ b/apps/web/src/app/(docs)/docs/hello-world/py/page.mdx
@@ -157,7 +157,7 @@ client = Anthropic()
def chat(code_interpreter: CodeInterpreter, user_message: str) -> Tuple[List[Result], Logs]:
print(f"\n{'='*50}\nUser Message: {user_message}\n{'='*50}")
- message = client.beta.tools.messages.create(
+ message = client.messages.create(
model=MODEL_NAME,
system=SYSTEM_PROMPT,
max_tokens=4096,
@@ -250,4 +250,4 @@ The chart was saved in the `chart.png` file and it should look similar to this:
className="rounded w-full"
alt="Chart visualizing distribution height of men"
unoptimized
-/>
\ No newline at end of file
+/>