Files
Cookbook recipe: "Codestral with self-correction"
In https://github.com/mistralai/cookbook/blob/main/third_party/langchain/langgraph_code_assistant_mistral.ipynb
Issue
The following code is not used:
code_gen_prompt_claude = ChatPromptTemplate.from_messages(
[
(
"system",
"""You are a coding assistant. Ensure any code you provide can be executed with all required imports and variables \n
defined. Structure your answer: 1) a prefix describing the code solution, 2) the imports, 3) the functioning code block.
\n Here is the user question:""",
),
("placeholder", "{messages}"),
]
)
And thus, this import can also be removed:
from langchain_core.prompts import ChatPromptTemplate
Tests
I ran the code in Colab, and it runs successfully without the dead code.