Skip to content

Conversation

@GiorgioSgl
Copy link

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes

    • Added deployment_id as a required parameter in the Chroma DB embedding function to support the newer version of the OpenAI Python SDK.
    • Updated the example usage to reflect the new parameter.
import chromadb.utils.embedding_functions as embedding_functions

openai_ef = embedding_functions.OpenAIEmbeddingFunction(
    api_key="YOUR_API_KEY",
    api_base="YOUR_API_BASE_PATH",
    api_type="azure",
    api_version="YOUR_API_VERSION",
    model_name="text-embedding-3-small",
    deployment_id="DEPLOYMENT_ID"  # Added for compatibility with newer OpenAI SDK
)
  • New functionality

    • No additional new functionality beyond the deployment_id support.

Test plan

  • No explicit tests required for this parameter addition; verified manually with OpenAI SDK.

Migration plan

  • No migrations needed.
  • For backward compatibility, users of older OpenAI SDK versions may omit deployment_id.

Observability plan

  • No additional monitoring needed; embedding function usage can be tracked through existing logs if desired.

Documentation Changes

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Oct 31, 2025

Add deployment_id to OpenAI embedding docs

Updates the OpenAI integration documentation to include the newly required deployment_id parameter for Azure/OpenAI SDK v1. This keeps the code sample functional with current SDK versions and adds inline comments clarifying when and why the parameter is needed.

Key Changes

• Inserted deployment_id="DEPLOYMENT_ID" in the Python example snippet
• Added two inline comments explaining that deployment_id is mandatory for Azure OpenAI and newer SDK versions

Affected Areas

docs/docs.trychroma.com/markdoc/content/integrations/embedding-models/openai.md

This summary was automatically generated by @propel-code-bot

…-models/openai.md

Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant