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 am having the same issue calling the DeepSeek model.
from langchain_core.prompts import ChatPromptTemplate
query_check_system = """You are a SQL expert with a strong attention to detail.
Double check the SQLite query for common mistakes, including:
- Using NOT IN with NULL values
- Using UNION when UNION ALL should have been used
- Using BETWEEN for exclusive ranges
- Data type mismatch in predicates
- Properly quoting identifiers
- Using the correct number of arguments for functions
- Casting to the correct data type
- Using the proper columns for joins
If there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query.
You will call the appropriate tool to execute the query after running this check."""
query_check_prompt = ChatPromptTemplate.from_messages(
[("system", query_check_system), ("placeholder", "{messages}")]
)
query_check = query_check_prompt | ChatOllama(model="deepseek-r1:1.5b", temperature=0).bind_tools(
[db_query_tool], tool_choice="required"
)
query_check.invoke({"messages": [("user", "SELECT * FROM Artist LIMIT 10;")]})
I'm using the js version of langchain with Ollama and I can now use format option to return json I will leave this open as looks like others have different experience for now
Checked other resources
Example Code
No Code needed
Error Message and Stack Trace (if applicable)
There is no exception
Description
I was trying deepseek-r1:14b today with ollama format:Json schema
looks like the integration need to be update as this kind of model when you ask question it start with thinking section before it start answering
so I was getting wrong output mainly the output was part of the thinking process
same code works with Phi4 and llamaa 3.2
System Info
I'm using the js version of langchain
The text was updated successfully, but these errors were encountered: