docs(js): session-auth switch for the RAG sample; structured-output naming note - #309
Open
fede-kamel wants to merge 1 commit into
Open
Conversation
…aming note - samples/rag_pipeline: new OCI_AUTH_TYPE env (ConfigFile, the default, or Session) selects the langchain-oci auth type, so the sample also runs with a profile created by `oci session authenticate` (security_token_file) instead of only API-key config-file auth. Unknown values fail fast with a clear message. README table updated. - libs/js/oci README: structured output binds a function named after the schema (or `extract`); recommend passing an explicit `name` when the schema has a top-level field called `name`, since smaller models can confuse the two. Verified: sample type-checks and runs end to end with OCI_AUTH_TYPE=Session against Oracle AI Database 26ai and OCI GenAI (xai.grok-4.20 answer with citation); README passes the package's prettier check.
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.
Two small follow-ups from the #301 and #303 reviews.
RAG sample:
OCI_AUTH_TYPE. The sample hardcodedOciGenAiNewClientAuthType.ConfigFile, so it could only run with API-key credentials. A newOCI_AUTH_TYPEenv var (ConfigFile, the default, orSession) selects the auth type, which lets the sample run with a profile created byoci session authenticate. Unknown values fail fast with a clear error. README table updated.libs/js/oci README: structured output naming.
withStructuredOutputbinds a function named after the schema, orextractwhen the schema has no name. When the schema has a top-level field literally calledname, Llama 3.3 was observed filling that field with the function name; GPT-4o was not. The README now recommends passing an explicitnamein that case.Verification: the sample type-checks and runs end to end with
OCI_AUTH_TYPE=Sessionagainst Oracle AI Database 26ai Free and OCI GenAI (ingestion, IVF index, retrieval, cited answer fromxai.grok-4.20); an invalidOCI_AUTH_TYPEis rejected with the intended message;pnpm format:checkpasses for the README.