feat: add key=value parameter parsing to OpenAI embedder#711
Merged
qin-ctx merged 2 commits intovolcengine:mainfrom Mar 18, 2026
Merged
feat: add key=value parameter parsing to OpenAI embedder#711qin-ctx merged 2 commits intovolcengine:mainfrom
qin-ctx merged 2 commits intovolcengine:mainfrom
Conversation
Collaborator
Author
|
other non-symmetric embedders usually only need the simple format. OpenAI can possibly support many different embedders, hence the update. |
e61b033 to
0850f18
Compare
Clean implementation on latest main (post PR volcengine#702 merge): - Add _parse_param_string() method for key=value parsing - Enhance _build_extra_body() to support multiple parameters - Maintain backward compatibility with simple string format - Update docstrings and examples Usage: - Simple: query_param='query' → {'input_type': 'query'} - Enhanced: query_param='input_type=query,task=search' → {'input_type': 'query', 'task': 'search'} Supports OpenAI-compatible servers with custom parameters while maintaining clean integration with PR volcengine#702's is_query API.
0850f18 to
28be83d
Compare
qin-ctx
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clean implementation that adds support for multiple parameters in query_param and document_param using key=value format.
✅ Based on merged PR #702 - This enhancement builds on the merged is_query parameter API from main branch.
Changes
_parse_param_string()method for key=value parsing_build_extra_body()to support multiple parameters with the is_query flagAPI Integration
_build_extra_body()methodUsage Examples
Simple Format (Backward Compatible)
Enhanced Format (Multiple Parameters)
Benefits
Testing
All functionality tested with both simple and enhanced parameter formats. Ready for review! 🚀