langchain-ai / langchain-google

MIT License
113 stars 143 forks source link

VertexModelGardenLlama using publisher model? #593

Open wonhs91 opened 1 week ago

wonhs91 commented 1 week ago
llm = VertexModelGardenLlama(
  model=MODEL,
  credentials=credentials,
  location=REGION,
  project=PROJECT_ID
)

I try to use llama3.1 model like above, and it throws the following error

HTTPStatusError: Error response 400 while fetching
  "error": {
    "code": 400,
    "message": "Project `XXXXXX` is not allowed to use Publisher Model `projects/XXXXXX/locations/REGION/publishers/meta/models/MODEL`",
    "status": "FAILED_PRECONDITION"
  }

The curl command using the same settings (model, credentials, locations, project_id) works. So I don't think it is the server issue.

lkuligin commented 1 day ago

could you share a full snippet, please? it's working fine on my side.