Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Model Name issue #479

Open
itsyaboyksi opened this issue Feb 4, 2025 · 0 comments
Open

No Model Name issue #479

itsyaboyksi opened this issue Feb 4, 2025 · 0 comments

Comments

@itsyaboyksi
Copy link

While using the ChatCompletionsClient everything seems to be working properly, but when I make use of the AzureAIChatCompletionsModel, using the below documentation.
https://learn.microsoft.com/en-us/azure/ai-studio/how-to/develop/langchain
and code:

import os
from langchain_azure_ai.chat_models import AzureAIChatCompletionsModel
from langchain_core.messages import HumanMessage, SystemMessage

model = AzureAIChatCompletionsModel(
endpoint={endpoint},
credential={api}
# added the model_name here before but it doesn't seem to work
)

messages = [
SystemMessage(content="Translate the following from English into Italian"),
HumanMessage(content="hi!"),
]
resp = model.invoke(messages) #here is throws straight up error, "model_name" arg not expected
print(resp)

Below Error is getting generated:
raise HttpResponseError(response=response)
azure.core.exceptions.HttpResponseError: (no_model_name) No model specified in request. Please provide a model name in the request body or as a x-ms-model-mesh-model-name header.
Code: no_model_name
Message: No model specified in request. Please provide a model name in the request body or as a x-ms-model-mesh-model-name header.

I understand it is expecting a model_name somewhere, but can someone help me with where should I exactly feed it.

I wanted to make use of the "DeepSeek-R1" that I have deployed on AI-Foundry, and want to use with langchain to create a RAG Pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant