-
Notifications
You must be signed in to change notification settings - Fork 729
Document OpenAI compatible API provider usage #2777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added instructions for using OpenAI compatible API provider, including required parameters and a JSON example.
|
|
WalkthroughThis pull request adds documentation to the waveai-modes file explaining how to configure an OpenAI-compatible API provider. The addition covers required configuration fields (ai:endpoint, ai:apitoken, ai:model), specifies "openai-chat" as the ai:mode value, clarifies that ai:endpoint must be a full endpoint URL, and includes a concrete JSON configuration example. The documentation section is added in two locations within the file, resulting in 27 added lines with no deletions. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@docs/docs/waveai-modes.mdx`:
- Around line 202-203: Update the documentation line to use the correct provider
wording and config key: change "OpenAPI compatible API provider" to
"OpenAI‑compatible API provider" and replace the config key reference from
"ai:mode" to "ai:apitype" (so the sentence reads that you must provide
ai:endpoint, ai:apitoken, ai:model and set ai:apitype to "openai-chat"); adjust
any nearby occurrences of "OpenAPI" and "ai:mode" to the corrected terms to keep
the doc consistent.
- Around line 206-209: Update the documentation text to replace the
incorrect/unclear token "baseurl" with the standardized phrasing "base URL"
wherever it appears in the paragraph referencing ai:endpoint (e.g., the sentence
"The ai:endpoint is *NOT* a baseurl." and the explanatory line "If you provide
only the baseurl..."); ensure the ai:endpoint example
(https://api.x.ai/v1/chat/completions) and surrounding sentences use "base URL"
for consistency and clarity.
| To use an OpenAPI compatible API provider, you need to provide the ai:endpoint, ai:apitoken, ai:model parameters, | ||
| and use "openai-chat" as the ai:mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect field name and provider terminology.
The config key should be ai:apitype, not ai:mode, and this section should say “OpenAI‑compatible,” not “OpenAPI compatible,” to match the rest of the doc and avoid broken configs.
✅ Proposed wording fix
-To use an OpenAPI compatible API provider, you need to provide the ai:endpoint, ai:apitoken, ai:model parameters,
-and use "openai-chat" as the ai:mode.
+To use an OpenAI-compatible API provider, you need to provide the ai:endpoint, ai:apitoken, ai:model parameters,
+and set "openai-chat" as the ai:apitype.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| To use an OpenAPI compatible API provider, you need to provide the ai:endpoint, ai:apitoken, ai:model parameters, | |
| and use "openai-chat" as the ai:mode. | |
| To use an OpenAI-compatible API provider, you need to provide the ai:endpoint, ai:apitoken, ai:model parameters, | |
| and set "openai-chat" as the ai:apitype. |
🧰 Tools
🪛 LanguageTool
[grammar] ~202-~202: Use a hyphen to join words.
Context: ...### OpenAI Compatible To use an OpenAPI compatible API provider, you need to pro...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
In `@docs/docs/waveai-modes.mdx` around lines 202 - 203, Update the documentation
line to use the correct provider wording and config key: change "OpenAPI
compatible API provider" to "OpenAI‑compatible API provider" and replace the
config key reference from "ai:mode" to "ai:apitype" (so the sentence reads that
you must provide ai:endpoint, ai:apitoken, ai:model and set ai:apitype to
"openai-chat"); adjust any nearby occurrences of "OpenAPI" and "ai:mode" to the
corrected terms to keep the doc consistent.
| The ai:endpoint is *NOT* a baseurl. The endpoint should contain the full endpoint, not just the baseurl. | ||
| For example: https://api.x.ai/v1/chat/completions | ||
|
|
||
| If you provide only the baseurl, you are likely to get a 404 message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tighten wording: use “base URL.”
“baseurl” is a spelling/formatting issue in docs; use “base URL” for clarity and consistency.
✍️ Suggested edit
-The ai:endpoint is *NOT* a baseurl. The endpoint should contain the full endpoint, not just the baseurl.
+The ai:endpoint is *NOT* a base URL. The endpoint should contain the full endpoint URL, not just the base URL.🧰 Tools
🪛 LanguageTool
[grammar] ~206-~206: Ensure spelling is correct
Context: ...de. :::note The ai:endpoint is NOT a baseurl. The endpoint should contain the full e...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~209-~209: Ensure spelling is correct
Context: ...t/completions If you provide only the baseurl, you are likely to get a 404 message. :...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
In `@docs/docs/waveai-modes.mdx` around lines 206 - 209, Update the documentation
text to replace the incorrect/unclear token "baseurl" with the standardized
phrasing "base URL" wherever it appears in the paragraph referencing ai:endpoint
(e.g., the sentence "The ai:endpoint is *NOT* a baseurl." and the explanatory
line "If you provide only the baseurl..."); ensure the ai:endpoint example
(https://api.x.ai/v1/chat/completions) and surrounding sentences use "base URL"
for consistency and clarity.
Added instructions for using OpenAI compatible API provider, including required parameters and a JSON example.
It took me a while to notice that, unlike most the common usage of a baseurl, waveterm needs the full endpoint.