langchain-ai / langchain-ibm

MIT License
10 stars 9 forks source link

tool calling template is hardcoded to mixtral #25

Open florenzi002 opened 3 weeks ago

florenzi002 commented 3 weeks ago

https://github.com/langchain-ai/langchain-ibm/blob/ee096018f8a7a3d0684e34fe74fd5ad137c886f9/libs/ibm/langchain_ibm/chat_models.py#L621

seems like the prompt for tool calling is hard coded explicitly mentioning Mixtral, is this required?

MateuszOssGit commented 2 weeks ago

@florenzi002 With 0.3.0 version of langchain_ibm it should be fixed. You can specify system prompt in messages param, and it's not hardcoded just for mixtral model.

messages = [
    ("system", "You are a helpful assistant that translates English to French."),
    (
        "human",
        "Translate this sentence from English to French. I love programming.",
    ),
]