You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners
ccurme 795c728f71
mistral[patch]: add IDs to tool calls (#20299)
Mistral gives us one ID per response, no individual IDs for tool calls.

```python
from langchain.agents import AgentExecutor, create_tool_calling_agent, tool
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_mistralai import ChatMistralAI


prompt = ChatPromptTemplate.from_messages(
    [
        ("system", "You are a helpful assistant"),
        ("human", "{input}"),
        MessagesPlaceholder("agent_scratchpad"),
    ]
)
model = ChatMistralAI(model="mistral-large-latest", temperature=0)

@tool
def magic_function(input: int) -> int:
    """Applies a magic function to an input."""
    return input + 2

tools = [magic_function]

agent = create_tool_calling_agent(model, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

agent_executor.invoke({"input": "what is the value of magic_function(3)?"})
```

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
5 months ago
..
ai21 ai21[patch]: fix core dep (#19874) 6 months ago
airbyte airbyte[patch]: release 0.1.1, python 3.9 compat (#18597) 7 months ago
anthropic infra, multiple: rc release versions (#20252) 5 months ago
astradb Revert "community: added `partners/package-name` folders" (#19662) 6 months ago
chroma chroma: bump rc, keep optional (#20298) 5 months ago
cohere cohere: move package to external repo (#20081) 6 months ago
elasticsearch elasticsearch[patch]: move to repo (#19620) 6 months ago
exa docs: Additional examples for partners/exa README (#18081) 7 months ago
fireworks core[minor], ...: add tool calls message (#18947) 5 months ago
google-genai Revert "community: added `partners/package-name` folders" (#19662) 6 months ago
google-vertexai Revert "community: added `partners/package-name` folders" (#19662) 6 months ago
groq core[minor], ...: add tool calls message (#18947) 5 months ago
ibm ibm[patch]: release 0.1.3 (#19094) 6 months ago
mistralai mistral[patch]: add IDs to tool calls (#20299) 5 months ago
mongodb community[patch], mongodb[patch]: Stop spamming SIMD import warnings (#19531) 6 months ago
nomic
nvidia-ai-endpoints Revert "community: added `partners/package-name` folders" (#19662) 6 months ago
nvidia-trt Revert "community: added `partners/package-name` folders" (#19662) 6 months ago
openai openai[patch]: use tool_calls in request (#20272) 5 months ago
pinecone pinecone[patch]: fix core min version (#20177) 5 months ago
robocorp robocorp[patch]: fix core min version (#19879) 6 months ago
together together: release 0.1.0 (#20225) 5 months ago
voyageai voyageai[patch]: top level reranker import (#19645) 6 months ago