Are you able to file a quota increase request? https://cloud.google.com/docs/quotas/view-manage
can you give some example code to run in local machine
i've tried and got some error, can you identify and resolve this issue
import os
# Replace with the path to your service account JSON key file
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "C:/credentials-770ba63bd0a0.json"
from anthropic import AnthropicVertex
LOCATION= "us-east4"
client = AnthropicVertex(region=LOCATION, project_id="proj-id")
message = client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Send me a recipe for banana bread.",
}
],
model="claude-3-5-haiku@20241022",
)
print(message.model_dump_json(indent=2))
NotFoundError Traceback (most recent call last) Cell In[2], line 12 8 LOCATION= "us-east4" #"europe-west1" #or us-east5" # or 10 client = AnthropicVertex(region=LOCATION, project_id="proj-id") ---> 12 message = client.messages.create( 13 max_tokens=1024, 14 messages=[ 15 { 16 "role": "user", 17 "content": "Send me a recipe for banana bread.", 18 } 19 ], 20 model="claude-3-5-haiku@20241022", 21 ) 22 print(message.model_dump_json(indent=2)) File c:\proj\fm-env\Lib\site-packages\anthropic\_utils\_utils.py:275, in required_args.<locals>.inner.<locals>.wrapper(*args, **kwargs) 273 msg = f"Missing required argument: {quote(missing[0])}" 274 raise TypeError(msg) --> 275 return func(*args, **kwargs) File c:proj\fm-env\Lib\site-packages\anthropic\resources\messages.py:888, in Messages.create(self, max_tokens, messages, model, metadata, stop_sequences, stream, system, temperature, tool_choice, tools, top_k, top_p, extra_headers, extra_query, extra_body, timeout) 881 if model in DEPRECATED_MODELS: 882 warnings.warn (...) 1068 retries_taken=retries_taken, 1069 ) NotFoundError: Error code: 404 - {'error': {'code': 404, 'message': 'Publisher Model `projects/proj-id/locations/us-east4/publishers/anthropic/models/claude-3-5-haiku@20241022` not found.', 'status': 'NOT_FOUND'}}
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |