Closed nikolamilosevic86 closed 5 months ago
can you verify that in this code client = AnthropicVertex(region=LOCATION, project_id=project_idea)
there is a valid string at project_idea
?
Yes, project_idea is a string of my project name in Google cloud. Interestingly, I have created a venv environment and installed libraries that I pip freezed from my local mac to the server where I had an issue. The libraries are:
annotated-types==0.6.0
anthropic==0.21.3
anyio==4.3.0
boto3==1.34.69
botocore==1.34.69
cachetools==5.3.3
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
distro==1.9.0
elastic-transport==8.12.0
elasticsearch==8.12.1
exceptiongroup==1.2.0
fastapi==0.110.0
filelock==3.13.1
fsspec==2024.3.1
google-api-core==2.18.0
google-auth==2.29.0
google-cloud-aiplatform==1.44.0
google-cloud-bigquery==3.19.0
google-cloud-core==2.4.1
google-cloud-resource-manager==1.12.3
google-cloud-storage==2.16.0
google-crc32c==1.5.0
google-resumable-media==2.7.0
googleapis-common-protos==1.63.0
grpc-google-iam-v1==0.13.0
grpcio==1.62.1
grpcio-status==1.62.1
h11==0.14.0
httpcore==1.0.4
httpx==0.27.0
huggingface-hub==0.22.0
idna==3.6
Jinja2==3.1.3
jmespath==1.0.1
joblib==1.3.2
MarkupSafe==2.1.5
mpmath==1.3.0
networkx==3.2.1
nltk==3.8.1
numpy==1.26.4
openai==1.14.2
packaging==24.0
pillow==10.2.0
proto-plus==1.23.0
protobuf==4.25.3
pyasn1==0.5.1
pyasn1-modules==0.3.0
pydantic==2.6.4
pydantic_core==2.16.3
python-dateutil==2.9.0.post0
PyYAML==6.0.1
regex==2023.12.25
requests==2.31.0
rsa==4.9
s3transfer==0.10.1
safetensors==0.4.2
shapely==2.0.3
six==1.16.0
sniffio==1.3.1
starlette==0.36.3
sympy==1.12
tokenizers==0.15.2
torch==2.2.1
torchaudio==2.2.1
torchvision==0.17.1
tqdm==4.66.2
transformers==4.39.1
typing_extensions==4.10.0
urllib3==1.26.18
uvicorn==0.29.0
vertexai==1.43.0
And it works. Not sure what is exactly the difference, but there seems to be some compatibility issue. But now it works for me. It may make sense if you check what is the issue for future. But as I said now I do not have issue anymore.
Great, glad to hear it! I'll close for now, but if others run into this and it continues to mystify, we can reopen.
I am following the instruction given and tried both
and with
I am using Python 3.9 and this is pip freeze:
I cannot find what is the problem. Can you please help?