Skip to content

feat(embedding): add pass_dimensions option for OpenAI embedding model#1897

Open
jinliyl wants to merge 1 commit into
agentscope-ai:mainfrom
jinliyl:dev/0619
Open

feat(embedding): add pass_dimensions option for OpenAI embedding model#1897
jinliyl wants to merge 1 commit into
agentscope-ai:mainfrom
jinliyl:dev/0619

Conversation

@jinliyl

@jinliyl jinliyl commented Jun 18, 2026

Copy link
Copy Markdown
Member
  • Add pass_dimensions parameter to control whether dimensions are passed to API
  • Update documentation to explain pass_dimensions functionality
  • Set pass_dimensions as instance attribute in constructor
  • Conditionally include dimensions in API call based on pass_dimensions flag
  • Improve embedding result processing with proper index handling
  • Support both embedding and dense_embedding attributes from response
  • Handle cases where index attribute may be missing or invalid

PR Title Format

Please ensure your PR title follows the Conventional Commits format:

  • Format: <type>(<scope>): <description>
  • Example: feat(memory): add redis cache support
  • Allowed types: feat, fix, docs, ci, refactor, test, chore, perf, style, build, revert
  • Description should start with a lowercase letter

AgentScope Version

[The version of AgentScope you are working on, e.g. import agentscope; print(agentscope.__version__)]

Description

[Please describe the background, purpose, changes made, and how to test this PR]

Checklist

Please check the following items before code is ready to be reviewed.

  • An issue has been created for this PR
  • I have read the CONTRIBUTING.md
  • Docstrings are in Google style
  • Related documentation has been updated (e.g. links, examples, etc.) in documentation repository
  • Code is ready for review

- Add pass_dimensions parameter to control whether dimensions are passed to API
- Update documentation to explain pass_dimensions functionality
- Set pass_dimensions as instance attribute in constructor
- Conditionally include dimensions in API call based on pass_dimensions flag
- Improve embedding result processing with proper index handling
- Support both embedding and dense_embedding attributes from response
- Handle cases where index attribute may be missing or invalid
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