You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
I am sure that this is a bug in LangChain rather than my code.
The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
Via VertexAIModelGarden almost nothing worked
from langchain_google_vertexai import VertexAI, ChatVertexAI, VertexAIEmbeddings
from langchain_google_vertexai import VertexAIModelGarden
from langchain_core.prompts import ChatPromptTemplate
from pydantic import BaseModel, Field
lm = VertexAIModelGarden(
location="europe-west4",
endpoint_id="11111186688",
temperature=0,
max_tokens=4096,
top_p=1.0,
top_k=-1,
verbose=True,
)
prompt = ChatPromptTemplate.from_messages([("human", "Some questions: {input}")])
chain = prompt | lm
result = chain.invoke(
{
"input": "Wie sieht die Stadt Hamburg aus?",
}
)
Via REST I did get rich output:
### Try vertexai huggingface model
POST https://europe-west4-aiplatform.googleapis.com/v1/projects/111122222/locations/europe-west4/endpoints/11111166666:predict
Content-Type: application/json
Authorization: Bearer ysdfasdfsdfasdfasfsdfasdfasdfasfsdfasfasdfasdfasdfasdf
{
"instances": [
{
"prompt": "Wie sieht die Stadt Hamburg aus?",
"max_tokens": 4096,
"temperature": 0,
"top_p": 1.0,
"top_k": -1
}
]
}
Error Message and Stack Trace (if applicable)
No response
Description
I find that the same model I deployed and used with a REST API worked fine, but when using VertexAIModelGarden the result is significantly cut off. The model used is deepseek r1 from Hugging Face. Did I forget something?
Checked other resources
Example Code
Via
VertexAIModelGarden
almost nothing workedVia REST I did get rich output:
Error Message and Stack Trace (if applicable)
No response
Description
I find that the same model I deployed and used with a REST API worked fine, but when using
VertexAIModelGarden
the result is significantly cut off. The model used is deepseek r1 from Hugging Face. Did I forget something?System Info
The text was updated successfully, but these errors were encountered: