# ollama: Properly format tool calls fed back to the model \(\#34750\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9450bcad25156f373e3b81a7a13d3ae5211a0537)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9450bcad25156f373e3b81a7a13d3ae5211a0537

Requested commit: 9450bcad25156f373e3b81a7a13d3ae5211a0537

Commit: 9450bcad25156f373e3b81a7a13d3ae5211a0537

Tree: 6f180b9f1398c3a050aa31853bf3edb4aabe346e

Author: marius851000

Committer: GitHub

## Message

```
ollama: Properly format tool calls fed back to the model (#34750)

Fix an issue that resulted in Ollama models not being able to not being
able to access the input of the commands they executed (only being able
to access the result).

This properly return the function history as shown in
https://github.com/ollama/ollama/blob/main/docs/api.md#chat-request-with-history-with-tools

Previously, function input where not returned and result where returned
as a "user" role.

Release Notes:

- ollama: Improved format when returning tool results to the models
```

## Parents

- [69bdef38ecef673609e1acf1e7a6d79f5d4d44d3](https://git.cafe/gitcafe/zed/commit/69bdef38ecef673609e1acf1e7a6d79f5d4d44d3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9450bcad25156f373e3b81a7a13d3ae5211a0537?format=markdown)
