langchain-ai / langchain-ibm

https://python.langchain.com/docs/integrations/providers/ibm
MIT License
10 stars 10 forks source link

tool calling template is hardcoded to mixtral #25

Closed florenzi002 closed 5 days ago

florenzi002 commented 1 month 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 1 month 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.",
    ),
]
MateuszOssGit commented 5 days ago

Closing due to no response / feedback