mirror of
https://github.com/ollama/ollama.git
synced 2026-05-06 16:11:34 -05:00
Closed
opened 2026-04-28 14:13:27 -05:00 by GiteaMirror
·
42 comments
No Branch/Tag Specified
main
dhiltgen/ci
parth-launch-plan-gating
hoyyeva/anthropic-reference-images-path
parth-anthropic-reference-images-path
brucemacd/download-before-remove
hoyyeva/editor-config-repair
parth-mlx-decode-checkpoints
parth-launch-codex-app
hoyyeva/fix-codex-model-metadata-warning
hoyyeva/qwen
parth/hide-claude-desktop-till-release
hoyyeva/opencode-image-modality
parth-add-claude-code-autoinstall
release_v0.22.0
pdevine/manifest-list
codex/fix-codex-model-metadata-warning
pdevine/addressable-manifest
brucemacd/launch-fetch-reccomended
jmorganca/llama-compat
launch-copilot-cli
hoyyeva/opencode-thinking
release_v0.20.7
parth-auto-save-backup
parth-test
jmorganca/gemma4-audio-replacements
fix-manifest-digest-on-pull
hoyyeva/vscode-improve
brucemacd/install-server-wait
parth/update-claude-docs
brucemac/start-ap-install
pdevine/mlx-update
pdevine/qwen35_vision
drifkin/api-show-fallback
mintlify/image-generation-1773352582
hoyyeva/server-context-length-local-config
jmorganca/faster-reptition-penalties
jmorganca/convert-nemotron
parth-pi-thinking
pdevine/sampling-penalties
jmorganca/fix-create-quantization-memory
dongchen/resumable_transfer_fix
pdevine/sampling-cache-error
jessegross/mlx-usage
hoyyeva/openclaw-config
hoyyeva/app-html
pdevine/qwen3next
brucemacd/sign-sh-install
brucemacd/tui-update
brucemacd/usage-api
jmorganca/launch-empty
fix-app-dist-embed
mxyng/mlx-compile
mxyng/mlx-quant
mxyng/mlx-glm4.7
mxyng/mlx
brucemacd/simplify-model-picker
jmorganca/qwen3-concurrent
fix-glm-4.7-flash-mla-config
drifkin/qwen3-coder-opening-tag
brucemacd/usage-cli
fix-cuda12-fattn-shmem
ollama-imagegen-docs
parth/fix-multiline-inputs
brucemacd/config-docs
mxyng/model-files
mxyng/simple-execute
fix-imagegen-ollama-models
mxyng/async-upload
jmorganca/lazy-no-dtype-changes
imagegen-auto-detect-create
parth/decrease-concurrent-download-hf
fix-mlx-quantize-init
jmorganca/x-cleanup
usage
imagegen-readme
jmorganca/glm-image
mlx-gpu-cd
jmorganca/imagegen-modelfile
parth/agent-skills
parth/agent-allowlist
parth/signed-in-offline
parth/agents
parth/fix-context-chopping
improve-cloud-flow
parth/add-models-websearch
parth/prompt-renderer-mcp
jmorganca/native-settings
jmorganca/download-stream-hash
jmorganca/client2-rebased
brucemacd/oai-chat-req-multipart
jessegross/multi_chunk_reserve
grace/additional-omit-empty
grace/mistral-3-large
mxyng/tokenizer2
mxyng/tokenizer
jessegross/flash
hoyyeva/windows-nacked-app
mxyng/cleanup-attention
grace/deepseek-parser
hoyyeva/remember-unsent-prompt
parth/add-lfs-pointer-error-conversion
parth/olmo2-test2
hoyyeva/ollama-launchagent-plist
nicole/olmo-model
parth/olmo-test
mxyng/remove-embedded
parth/render-template
jmorganca/intellect-3
parth/remove-prealloc-linter
jmorganca/cmd-eval
nicole/nomic-embed-text-fix
mxyng/lint-2
hoyyeva/add-gemini-3-pro-preview
hoyyeva/load-model-list
mxyng/expand-path
mxyng/environ-2
hoyyeva/deeplink-json-encoding
parth/improve-tool-calling-tests
hoyyeva/conversation
hoyyeva/assistant-edit-response
hoyyeva/thinking
origin/brucemacd/invalid-char-i-err
parth/improve-tool-calling
jmorganca/required-omitempty
grace/qwen3-vl-tests
mxyng/iter-client
parth/docs-readme
nicole/embed-test
pdevine/integration-benchstat
parth/remove-generate-cmd
parth/add-toolcall-id
mxyng/server-tests
jmorganca/glm-4.6
jmorganca/gin-h-compat
drifkin/stable-tool-args
pdevine/qwen3-more-thinking
parth/add-websearch-client
nicole/websearch_local
jmorganca/qwen3-coder-updates
grace/deepseek-v3-migration-tests
mxyng/fix-create
jmorganca/cloud-errors
pdevine/parser-tidy
revert-12233-parth/simplify-entrypoints-runner
parth/enable-so-gpt-oss
brucemacd/qwen3vl
jmorganca/readme-simplify
parth/gpt-oss-structured-outputs
revert-12039-jmorganca/tools-braces
mxyng/embeddings
mxyng/gguf
mxyng/benchmark
mxyng/types-null
parth/move-parsing
mxyng/gemma2
jmorganca/docs
mxyng/16-bit
mxyng/create-stdin
pdevine/authorizedkeys
mxyng/quant
parth/opt-in-error-context-window
brucemacd/cache-models
brucemacd/runner-completion
jmorganca/llama-update-6
brucemacd/benchmark-list
brucemacd/partial-read-caps
parth/deepseek-r1-tools
mxyng/omit-array
parth/tool-prefix-temp
brucemacd/runner-test
jmorganca/qwen25vl
brucemacd/model-forward-test-ext
parth/python-function-parsing
jmorganca/cuda-compression-none
drifkin/num-parallel
drifkin/chat-truncation-fix
jmorganca/sync
parth/python-tools-calling
drifkin/array-head-count
brucemacd/create-no-loop
parth/server-enable-content-stream-with-tools
qwen25omni
mxyng/v3
brucemacd/ropeconfig
jmorganca/silence-tokenizer
parth/sample-so-test
parth/sampling-structured-outputs
brucemacd/doc-go-engine
parth/constrained-sampling-json
jmorganca/mistral-wip
brucemacd/mistral-small-convert
parth/sample-unmarshal-json-for-params
brucemacd/jomorganca/mistral
pdevine/bfloat16
jmorganca/mistral
brucemacd/mistral
pdevine/logging
parth/sample-correctness-fix
parth/sample-fix-sorting
jmorgan/sample-fix-sorting-extras
jmorganca/temp-0-images
brucemacd/parallel-embed-models
brucemacd/shim-grammar
jmorganca/fix-gguf-error
bmizerany/nameswork
jmorganca/faster-releases
bmizerany/validatenames
brucemacd/err-no-vocab
brucemacd/rope-config
brucemacd/err-hint
brucemacd/qwen2_5
brucemacd/logprobs
brucemacd/new_runner_graph_bench
progress-flicker
brucemacd/forward-test
brucemacd/go_qwen2
pdevine/gemma2
jmorganca/add-missing-symlink-eval
mxyng/next-debug
parth/set-context-size-openai
brucemacd/next-bpe-bench
brucemacd/next-bpe-test
brucemacd/new_runner_e2e
brucemacd/new_runner_qwen2
pdevine/convert-cohere2
brucemacd/convert-cli
parth/log-probs
mxyng/next-mlx
mxyng/cmd-history
parth/templating
parth/tokenize-detokenize
brucemacd/check-key-register
bmizerany/grammar
jmorganca/vendor-081b29bd
mxyng/func-checks
jmorganca/fix-null-format
parth/fix-default-to-warn-json
jmorganca/qwen2vl
jmorganca/no-concat
parth/cmd-cleanup-SO
brucemacd/check-key-register-structured-err
parth/openai-stream-usage
parth/fix-referencing-so
stream-tools-stop
jmorganca/degin-1
brucemacd/install-path-clean
brucemacd/push-name-validation
brucemacd/browser-key-register
jmorganca/openai-fix-first-message
jmorganca/fix-proxy
jessegross/sample
parth/disallow-streaming-tools
dhiltgen/remove_submodule
jmorganca/ga
jmorganca/mllama
pdevine/newlines
pdevine/geems-2b
jmorganca/llama-bump
mxyng/modelname-7
mxyng/gin-slog
mxyng/modelname-6
jyan/convert-prog
jyan/quant5
paligemma-support
pdevine/import-docs
jmorganca/openai-context
jyan/paligemma
jyan/p2
jyan/palitest
bmizerany/embedspeedup
jmorganca/llama-vit
brucemacd/allow-ollama
royh/ep-methods
royh/whisper
mxyng/api-models
mxyng/fix-memory
jyan/q4_4/8
jyan/ollama-v
royh/stream-tools
roy-embed-parallel
bmizerany/hrm
revert-5963-revert-5924-mxyng/llama3.1-rope
royh/embed-viz
jyan/local2
jyan/auth
jyan/local
jyan/parse-temp
jmorganca/template-mistral
jyan/reord-g
royh-openai-suffixdocs
royh-imgembed
royh-embed-parallel
jyan/quant4
royh-precision
jyan/progress
pdevine/fix-template
jyan/quant3
pdevine/ggla
mxyng/update-registry-domain
jmorganca/ggml-static
mxyng/create-context
jyan/v0.146
mxyng/layers-from-files
build_dist
bmizerany/noseek
royh-ls
royh-name
timeout
mxyng/server-timestamp
bmizerany/nosillyggufslurps
royh-params
jmorganca/llama-cpp-7c26775
royh-openai-delete
royh-show-rigid
jmorganca/enable-fa
jmorganca/no-error-template
jyan/format
royh-testdelete
bmizerany/fastverify
language_support
pdevine/ps-glitches
brucemacd/tokenize
bruce/iq-quants
bmizerany/filepathwithcoloninhost
mxyng/split-bin
bmizerany/client-registry
jmorganca/if-none-match
native
jmorganca/native
jmorganca/batch-embeddings
jmorganca/initcmake
jmorganca/mm
pdevine/showggmlinfo
modenameenforcealphanum
bmizerany/modenameenforcealphanum
jmorganca/done-reason
jmorganca/llama-cpp-8960fe8
ollama.com
bmizerany/filepathnobuild
bmizerany/types/model/defaultfix
rmdisplaylong
nogogen
bmizerany/x
modelfile-readme
bmizerany/replacecolon
jmorganca/limit
jmorganca/execstack
jmorganca/replace-assets
mxyng/tune-concurrency
jmorganca/testing
whitespace-detection
jmorganca/options
upgrade-all
scratch
cuda-search
mattw/airenamer
mattw/allmodelsonhuggingface
mattw/quantcontext
mattw/whatneedstorun
brucemacd/llama-mem-calc
mattw/faq-context
mattw/communitylinks
mattw/noprune
mattw/python-functioncalling
rename
mxyng/install
pulse
remove-first
editor
mattw/selfqueryingretrieval
cgo
mattw/howtoquant
api
matt/streamingapi
format-config
mxyng/extra-args
shell
update-nous-hermes
cp-model
upload-progress
fix-unknown-model
fix-model-names
delete-fix
insecure-registry
ls
deletemodels
progressbar
readme-updates
license-layers
skip-list
list-models
modelpath
matt/examplemodelfiles
distribution
go-opts
v0.23.1
v0.23.1-rc0
v0.23.0
v0.23.0-rc0
v0.22.1
v0.22.1-rc1
v0.22.1-rc0
v0.22.0
v0.22.0-rc1
v0.21.3-rc0
v0.21.2-rc1
v0.21.2
v0.21.2-rc0
v0.21.1
v0.21.1-rc1
v0.21.1-rc0
v0.21.0
v0.21.0-rc1
v0.21.0-rc0
v0.20.8-rc0
v0.20.7
v0.20.7-rc1
v0.20.7-rc0
v0.20.6
v0.20.6-rc1
v0.20.6-rc0
v0.20.5
v0.20.5-rc2
v0.20.5-rc1
v0.20.5-rc0
v0.20.4
v0.20.4-rc2
v0.20.4-rc1
v0.20.4-rc0
v0.20.3
v0.20.3-rc0
v0.20.2
v0.20.1
v0.20.1-rc2
v0.20.1-rc1
v0.20.1-rc0
v0.20.0
v0.20.0-rc1
v0.20.0-rc0
v0.19.0
v0.19.0-rc2
v0.19.0-rc1
v0.19.0-rc0
v0.18.4-rc1
v0.18.4-rc0
v0.18.3
v0.18.3-rc2
v0.18.3-rc1
v0.18.3-rc0
v0.18.2
v0.18.2-rc1
v0.18.2-rc0
v0.18.1
v0.18.1-rc1
v0.18.1-rc0
v0.18.0
v0.18.0-rc2
v0.18.0-rc1
v0.18.0-rc0
v0.17.8-rc4
v0.17.8-rc3
v0.17.8-rc2
v0.17.8-rc1
v0.17.8-rc0
v0.17.7
v0.17.7-rc2
v0.17.7-rc1
v0.17.7-rc0
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.1-rc2
v0.17.1-rc1
v0.17.1-rc0
v0.17.0
v0.17.0-rc2
v0.17.0-rc1
v0.17.0-rc0
v0.16.3
v0.16.3-rc2
v0.16.3-rc1
v0.16.3-rc0
v0.16.2
v0.16.2-rc0
v0.16.1
v0.16.0
v0.16.0-rc2
v0.16.0-rc0
v0.16.0-rc1
v0.15.6
v0.15.5
v0.15.5-rc5
v0.15.5-rc4
v0.15.5-rc3
v0.15.5-rc2
v0.15.5-rc1
v0.15.5-rc0
v0.15.4
v0.15.3
v0.15.2
v0.15.1
v0.15.1-rc1
v0.15.1-rc0
v0.15.0-rc6
v0.15.0
v0.15.0-rc5
v0.15.0-rc4
v0.15.0-rc3
v0.15.0-rc2
v0.15.0-rc1
v0.15.0-rc0
v0.14.3
v0.14.3-rc3
v0.14.3-rc2
v0.14.3-rc1
v0.14.3-rc0
v0.14.2
v0.14.2-rc1
v0.14.2-rc0
v0.14.1
v0.14.0-rc11
v0.14.0
v0.14.0-rc10
v0.14.0-rc9
v0.14.0-rc8
v0.14.0-rc7
v0.14.0-rc6
v0.14.0-rc5
v0.14.0-rc4
v0.14.0-rc3
v0.14.0-rc2
v0.14.0-rc1
v0.14.0-rc0
v0.13.5
v0.13.5-rc1
v0.13.5-rc0
v0.13.4-rc2
v0.13.4
v0.13.4-rc1
v0.13.4-rc0
v0.13.3
v0.13.3-rc1
v0.13.3-rc0
v0.13.2
v0.13.2-rc2
v0.13.2-rc1
v0.13.2-rc0
v0.13.1
v0.13.1-rc2
v0.13.1-rc1
v0.13.1-rc0
v0.13.0
v0.13.0-rc0
v0.12.11
v0.12.11-rc1
v0.12.11-rc0
v0.12.10
v0.12.10-rc1
v0.12.10-rc0
v0.12.9-rc0
v0.12.9
v0.12.8
v0.12.8-rc0
v0.12.7
v0.12.7-rc1
v0.12.7-rc0
v0.12.7-citest0
v0.12.6
v0.12.6-rc1
v0.12.6-rc0
v0.12.5
v0.12.5-rc0
v0.12.4
v0.12.4-rc7
v0.12.4-rc6
v0.12.4-rc5
v0.12.4-rc4
v0.12.4-rc3
v0.12.4-rc2
v0.12.4-rc1
v0.12.4-rc0
v0.12.3
v0.12.2
v0.12.2-rc0
v0.12.1
v0.12.1-rc1
v0.12.1-rc2
v0.12.1-rc0
v0.12.0
v0.12.0-rc1
v0.12.0-rc0
v0.11.11
v0.11.11-rc3
v0.11.11-rc2
v0.11.11-rc1
v0.11.11-rc0
v0.11.10
v0.11.9
v0.11.9-rc0
v0.11.8
v0.11.8-rc0
v0.11.7-rc1
v0.11.7-rc0
v0.11.7
v0.11.6
v0.11.6-rc0
v0.11.5-rc4
v0.11.5-rc3
v0.11.5
v0.11.5-rc5
v0.11.5-rc2
v0.11.5-rc1
v0.11.5-rc0
v0.11.4
v0.11.4-rc0
v0.11.3
v0.11.3-rc0
v0.11.2
v0.11.1
v0.11.0-rc0
v0.11.0-rc1
v0.11.0-rc2
v0.11.0
v0.10.2-int1
v0.10.1
v0.10.0
v0.10.0-rc4
v0.10.0-rc3
v0.10.0-rc2
v0.10.0-rc1
v0.10.0-rc0
v0.9.7-rc1
v0.9.7-rc0
v0.9.6
v0.9.6-rc0
v0.9.6-ci0
v0.9.5
v0.9.4-rc5
v0.9.4-rc6
v0.9.4
v0.9.4-rc3
v0.9.4-rc4
v0.9.4-rc1
v0.9.4-rc2
v0.9.4-rc0
v0.9.3
v0.9.3-rc5
v0.9.4-citest0
v0.9.3-rc4
v0.9.3-rc3
v0.9.3-rc2
v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1.21
v0.1.20
v0.1.19
v0.1.18
v0.1.17
v0.1.16
v0.1.15
v0.1.14
v0.1.13
v0.1.12
v0.1.11
v0.1.10
v0.1.9
v0.1.8
v0.1.7
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
v0.0.21
v0.0.20
v0.0.19
v0.0.18
v0.0.17
v0.0.16
v0.0.15
v0.0.14
v0.0.13
v0.0.12
v0.0.11
v0.0.10
v0.0.9
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels
amd
api
app
bug
build
cli
cloud
compatibility
context-length
create
docker
documentation
embeddings
feature request
feedback wanted
good first issue
gpt-oss
gpu
harmony
help wanted
image
install
intel
js
launch
linux
macos
memory
mlx
model
needs more info
networking
nvidia
ollama.com
performance
pull-request
python
question
registry
rendering
thinking
tools
top
vulkan
windows
wsl
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ollama#50124
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vertrue on GitHub (Jul 19, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5796
Originally assigned to: @ParthSareen on GitHub.
What is the issue?
Hi everyone!
I am trying to use tools in requests to
llama3-groq-tool-use:70b. Here is simple code in Python using langchain==0.2.9:The result is following:
If I am using
langchain_community.chat_models.ollama.ChatOllamait output the same.But if I use same model (
llama3-groq-70b-8192-tool-use-preview) with groq OpenAI Compatible API, it uses tools and invokes the functions, output below:Is it expected behaviour or this problem is it still in progress?
Many thanks
OS
Linux
GPU
Nvidia
CPU
Intel
Ollama version
0.2.7
@rick-github commented on GitHub (Jul 19, 2024):
The dedicated tool handling is a recent addition to ollama so probably needs some tweaking. Looking at your logs, it would seem that what ollama is returning is not what langchain is expecting, so some digging through the code on both sides would be needed to match them up.
@marcnnn commented on GitHub (Jul 19, 2024):
I found out that Ollama sends “stop” and not "finish_reason": "tool_calls"
like groq api that I tested it against.
I was using langchain on elixir.
"finish_reason" => "tool_calls", deleting this from the Pattern match helped.
Ollama OpenAi api should answer with tool_calls as a finishing reason as well
@vertrue commented on GitHub (Jul 20, 2024):
Nice! Hope this will get fixed soon
@KSemenenko commented on GitHub (Jul 20, 2024):
me too!
@vertrue commented on GitHub (Jul 23, 2024):
@rick-github hi! are you in contact with someone who can fix this issue or review current PR?
seems like this bug is critical for langchain... or any other instrument that can use tools
@rick-github commented on GitHub (Jul 23, 2024):
Sorry, I'm not a member of the ollama team. I see that you've tagged Jeffrey, you'll to wait until he or somebody with review powers takes a look. In the meantime you'll have to build locally.
@KSemenenko commented on GitHub (Jul 23, 2024):
Llama 3.1 is here, function is here, now this is super important fix
@rick-github commented on GitHub (Jul 23, 2024):
The current version of llama3.1 doesn't support tools, https://github.com/ollama/ollama/issues/5885
@vertrue commented on GitHub (Jul 23, 2024):
I dug deeper
when agent is executed in langchain. here is outputs right before function callings:
groq:
ollama:
now I am not sure if it is a bug :)
@vertrue commented on GitHub (Jul 24, 2024):
found out that ollama is not parsing tools if
req.Stream = truefound out that here
ChatRequest.Streamis by default istruea6cd8f6169/api/types.go (L93)so if you are calling
/v1/chat/completions, it just does not parse tools and return text response with tool in tags:a6cd8f6169/server/routes.go (L1372)changing
if req.Stream != nil && !*req.Streamto
if req.Stream != nil && *req.Streamstill gives answer without tools
investigating further to see what langchain is looking for in response, because
fmt.Print(len(resp.Message.ToolCalls))right after this linea6cd8f6169/server/routes.go (L1401)prints
1(not0) to consolefor me it looks like
api.ChatResponseshould also have fieldToolCalls@KSemenenko commented on GitHub (Jul 24, 2024):
I found Mistarl 7B also support toolling, lets check it! maybe groc model is broken
@vertrue commented on GitHub (Jul 24, 2024):
langchain is working with chunks
and ollama does not return any chunk that includes tools
here is request to
/v1/chat/completions:here is output of the last chunk:
@rick-github commented on GitHub (Jul 24, 2024):
Looks like you pasted the last chunk instead of the request.
@vertrue commented on GitHub (Jul 24, 2024):
@rick-github fixed
@vertrue commented on GitHub (Jul 24, 2024):
@KSemenenko fixed, I believe!
you can pull my branch if urgent
@vertrue commented on GitHub (Aug 8, 2024):
still waiting for PR :(
@vertrue commented on GitHub (Aug 21, 2024):
interesting update
the following code allows to call tools without any problems. not sure if
langchain-ollamausesstream=trueollama 0.3.6, langchain-ollama 0.1.1
@raducoravu commented on GitHub (Nov 13, 2024):
Any idea when this will get fixed in an official ollama release? It affects me too.
@Mhijazi16 commented on GitHub (Nov 15, 2024):
any new updates I can't get work done becuase of this issue
@ParthSareen commented on GitHub (Nov 19, 2024):
Hi everyone! Thanks for being patient!
I'd love to understand the use case for streamed tool calls. Would appreciate if you can attach code samples as well (can be any framework/usage).
For any tool to be called you'd need the full response from the model to make the decision for which function to call and with what parameters. And since these are not user facing, one usually just waits for the response from the model to complete.
If this is a more framework enabled concept I am a bit weary of adding that as core functionality to Ollama - but happy to reconsider.
@codefromthecrypt commented on GitHub (Nov 19, 2024):
@ParthSareen tool calls are the main way to integrate data besides RAG (feel free to argue). Streaming is currently in use by tools like kibana and many demos that render UIs, and core kibana functionality requires tool usage to integrate data.
A good start would be to fully support streaming options. We (elastic) raised a pull request on that recently, and afterwards could consider helping on tool calls. As you can imagine, maintaining diffs is its own task, so landing one thing before another is important https://github.com/ollama/ollama/pull/6784
@raducoravu commented on GitHub (Nov 19, 2024):
@ParthSareen in my case I have a GUI Chat view implemented in Java, when chatting with the AI engine, the engine has various tools at its disposal that it can (if necessary) invoke from the client side. All interactions with the AI engine are done by passing the "stream":true property so that the end user receives their final answer from the AI engine gradually as it is generated.
When working with an OpenAI server directly indeed the tool calls themselves received from the server side are chunked like this:
It does not bother me if the tool call from the server side would be received in one chunk or in three chunks.
@ParthSareen commented on GitHub (Nov 19, 2024):
@raducoravu @codefromthecrypt
Thanks for the quick replies! Will dig into this a bit more and hopefully provide some clarity.
@tzolov commented on GitHub (Nov 19, 2024):
@ParthSareen,
Based on our Spring AI implementation experience with various AI providers:
Because the tool_call messages require complete JSON content before processing, we pre-aggregate only the tool_call chunks into single messages, while keeping regular text responses streaming.
This satisfies both requirements - complete tool calls and streamed final responses.
It would have been nice if the providers did the JSON aggregation on the server/model side.
Note: Initially, we used to switch to non-streaming after detecting the first tool calls message, but user feedback favored keeping the final text responses streamed.
Ollama is an amazing tool! Looking forward to extending our Ollama Function Calling support with streaming when it's ready!
@edmcman commented on GitHub (Nov 19, 2024):
My situation is very similar to @raducoravu's. I have a chat and want to stream the chat results. I don't care about the tool results streaming. (It's hard to imagine an application where streaming the tool results is important...)
@codefromthecrypt commented on GitHub (Nov 20, 2024):
PSA not everyone has the influence or skill to hunt down the calls sites that use a particular API. Sometimes they are buried in frameworks or otherwise not easy to change. In any case, it costs a significant amount of downstream effort to discover this limitation and then possibly make comments as we've seen. If we look at this issue, we can see a myriad of projects linking problems found to it.
What I'm curious about is related to other parts of openai. When there is incentive (I think we can agree there is incentive here, even if some arguments about the practice).. is it possible for someone to raise a PR and complete a change?
More and more products are normalizing on openai as a portability layer, and that doesn't mean each agrees with all the API decisions. I guess what I mean to say is how much stake is there in not completing this, or allowing it to be completed by someone else?
@ParthSareen commented on GitHub (Nov 20, 2024):
Hey everyone!
Thank you for raising some great points - we'll be working over the next little bit to get this in!
Still figuring out the exact details as it could potentially break some experiences. But this is definitely high up on my list - thankful for you all to bring it up. It's all about making the experience better for you all while having good engineering decisions.
@jackmpcollins commented on GitHub (Nov 20, 2024):
@ParthSareen I have a use case that would benefit from streaming the tool call arguments, like openai does. In https://github.com/jackmpcollins/magentic tool calling is used to generate structured outputs. When an iterable of structured objects
Xis requested, under the hood magentic submits a tool with return typelist[X], and as the arguments are being streamed back each item is parsed out and yielded when it completes. The advantage of this approach is structured items can start being displayed in UI (or acted on in other ways) without waiting for the whole generation to have finished.Some details about this in the docs here https://magentic.dev/streaming/#object-streaming with example code:
A similar approach is used in https://github.com/jxnl/instructor for the "partial responses" feature. More details in docs here https://python.useinstructor.com/concepts/partial/
@lucaskatayama commented on GitHub (Nov 21, 2024):
Hey guys... Sorry didn't read the entire thread... But I think I am in the right thread.
I am trying to get langchain to receive chunks when using agents... basically I need ollama to accept stream when using tools...
I achieved that by doing the changes below:
Modify the ollama server to identify the prefix \f and join all chunks into a tool message response. Sending through stream
https://github.com/ollama/ollama/compare/main...lucaskatayama:ollama:feat/tool-stream?expand=1
Modify langchain_ollama . Change
stream=Falsetostream=TrueI am contributing with an idea. Don't know if thi is the right way..
@edmcman commented on GitHub (Nov 21, 2024):
It would be best to not require changing the modelfiles...
On Thu, Nov 21, 2024 at 9:46 AM Lucas Katayama - @.***
@.***> wrote:
@ParthSareen commented on GitHub (Nov 28, 2024):
Hey everyone! Thanks for being so patient :) New release just went out with streaming tool call support. Will ping some folks around the community so they don't have to work around it.
Appreciate all the insight for this issue! https://github.com/ollama/ollama/releases/tag/v0.4.6
Quick Notes:
@edmcman commented on GitHub (Nov 28, 2024):
Thank you!
On Wed, Nov 27, 2024, 9:41 PM Parth Sareen - @.***
@.***> wrote:
@jackmpcollins commented on GitHub (Nov 29, 2024):
@ParthSareen I opened an issue for adding the
indexto each tool call as this breaks compatibility for some use cases. https://github.com/ollama/ollama/issues/7881 Otherwise it is working well! Thank you@ParthSareen commented on GitHub (Nov 29, 2024):
Ahh dang must have missed that field! Will add in the AM thanks for the ping!
@Rizaldy commented on GitHub (Nov 29, 2024):
Hi @ParthSareen want to add feedback after updated Ollama to 0.4.6, as the above:
stream in chunkbut in onecontentBut if I remove
toolsfrom payload it stream like normal. Just want to know if this is a new implementations or something is missing?@ParthSareen commented on GitHub (Nov 30, 2024):
@Rizaldy Yes in streaming mode this is expected. Essentially we don't know when a tool is going to come back from a model. If there is a toolcall present, the content should be removed and only the call should be sent back, and if there is no toolcall we should return whatever content was returned by the model. Hope this helps!
@RippinRocket commented on GitHub (Nov 30, 2024):
@ParthSareen I'm seeing the same thing using the python library. If I don't include tools in the payload, the response content streams across token by token. If I do include tools, I get a streamed response but it contains the full response content in one go instead of token by token.
@ParthSareen commented on GitHub (Nov 30, 2024):
Hey @Rizaldy @RippinRocket,
We wanted to get a quick implementation out to unblock people on this. Will scope something in to eventually identify a bit earlier whether tool calls are coming back or not and then stream rest of the response out (tracking in: https://github.com/ollama/ollama/issues/7886).
In the meantime I'd recommend to pass tools in when needed and less for chatting - especially with small models as they overfit to sending tool responses back anyways. Appreciate y'all raising this!
@saivishwak commented on GitHub (Feb 28, 2025):
When using tools and stream, the reponse has tools_call even when the query is non tool related, Is this expected issue?
@ParthSareen commented on GitHub (Mar 3, 2025):
Hey @saivishwak, this is just model behavior. Smaller models when provided tools tend to lean towards making tool calls than not. If you're constrained to using small models, I'd recommend adding a client to manage the other responses.
@edmcman commented on GitHub (Mar 3, 2025):
@ParthSareen wrote:
This may be true, but it's certainly not the only thing going on here. Ollama is using a poorly performing prompt template. See https://edmcman.github.io/blog/2025-02-21--lang-chain-and-ollama-make-building-local-tool-calling-agents-easy-it-s-a-shame-they-don-t-work-part-2/ -- very curious to hear your thoughts.
@saivishwak You might want to try https://ollama.com/ejschwar/llama3.2-better-prompts or use a different host than Ollama. You can test llama 3.2 on groq pretty easily for free. For instance, I found that on Ollama,
llama3.2regularly responds to "Hello" with a tool call. On groq/llama.cpp, it does not. I believe it all boils down to the prompt template.@ParthSareen commented on GitHub (Mar 3, 2025):
@edmcman Cool work on hacking on the template! Llama3.2 uses a python function for which we don't parse as of yet. It probably explains some of the difference in behavior.