Skip to content

Python: correct Ollama embedding truncate default documentation - #9672

Open
LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:docs/ollama-truncate-default-20261024
Open

LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:docs/ollama-truncate-default-20261024

Conversation

@ktz03

Copy link
Copy Markdown
Contributor

Motivation & Context

The OllamaEmbeddingOptions.truncate documentation says the default is False. Ollama's embed API reference documents true as the default. When the option is omitted, the adapter leaves the server default in effect.

Description & Review Guide

  • What are the major changes? Move the default marker from False to True in the existing option docstring.
  • What is the impact of these changes? Readers see the correct default; runtime behavior, APIs and dependencies are unchanged.
  • What do you want reviewers to focus on? The default described by the embed API and the adapter's existing omission behavior. Validation is limited to syntax, static equivalence and formatting checks; no server, model, package build or full suite was run.

Related Issue

N/A - trivial change. This corrects a factual default in an attribute docstring to match the documented API. It does not change the implementation or introduce a behavior choice.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Documentation and this PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped documentation correction matches the server default and introduces no runtime changes.

No open issues 🎉

What changed in this PR

Corrects the documented default for OllamaEmbeddingOptions.truncate in the Python Ollama integration to match the embed API.

Changes:

  • Moves the default marker from False to True in the attribute docstring.
  • Leaves runtime behavior, APIs, and dependencies unchanged.
File Description
python/​packages/​ollama/​agent_framework_ollama/​_embedding_client.py Corrects the truncate default documentation.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github-app-auth — cd03653f Deployed Oct 24, 2026 by ktz03 via team_check #7392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants