-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
azure-openai[minor]: update docs and fix openai api usage (#4898)
* feat: add Azure OpenAI examples docs: add Azure OpenAI SDK documentation docs: update docs and example for new package name docs: update readme docs: add Azure LLM integrations docs: update doc docs: add managed identity usage fix: add missing model name in example docs: add Azure OpenAI embeddings docs * docs: fix embedding example * chore: cleanup old changes * docs: fix docs and add missing sections * docs: fix build * fix: openai key usage with LLM * docs: add missing model name * fix: openai key usage with embeddings * feat: disable stripNewLines option by default BREAKING CHANGE: stripNewLines option is now disabled by default * chore: missing only in test * fix: openai key usage with chat * chore: formatting * chore: formatting * Update index.mdx --------- Co-authored-by: Jacob Lee <[email protected]>
- Loading branch information
1 parent
14632b7
commit c694a5d
Showing
10 changed files
with
305 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { AzureChatOpenAI } from "@langchain/azure-openai"; | ||
|
||
export const run = async () => { | ||
const model = new AzureChatOpenAI({ | ||
modelName: "gpt-4", | ||
prefixMessages: [ | ||
{ | ||
role: "system", | ||
content: "You are a helpful assistant that answers in pirate language", | ||
}, | ||
], | ||
maxTokens: 50, | ||
}); | ||
const res = await model.invoke( | ||
"What would be a good company name for a company that makes colorful socks?" | ||
); | ||
console.log({ res }); | ||
}; |
This file contains 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
Oops, something went wrong.