docs/examples: add a minimal Qianfan onboarding example#3433
Closed
jimmyzhuu wants to merge 1 commit into
Closed
Conversation
Member
|
Thanks for sharing this. While we won't have this in this repo, please feel free to share it in your own repo or resources. |
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.
Summary
This PR adds a small, built-in OpenAI-compatible onboarding path for Baidu Qianfan without introducing any new provider abstraction.
Changes in scope:
examples/model_providers/qianfan_provider.pytests/test_qianfan_model_provider_example.pytests/test_run_examples_script.pyexamples/model_providers/README.mddocs/models/index.mdWhat the example does:
AsyncOpenAIagainst Qianfan's OpenAI-compatible base URLset_default_openai_client(...)set_default_openai_api("chat_completions")QIANFAN_API_KEYis not setWhy this shape:
Validation notes:
ernie-5.0Non-goals:
Test plan
Automated local verification:
Result:
Credentialed provider validation against Qianfan's OpenAI-compatible endpoint:
ernie-5.0ernie-5.0Example safety check without credentials:
Result:
Skipping run because no valid QIANFAN_API_KEY was provided.Formatting and linting:
Result:
Docs verification:
Result:
Issue number
N/A
Checks
make lintandmake format