Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Jan 24, 2025
1 parent d15a45d commit 043946b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/langchain-openai/src/azure/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export type { AzureOpenAIInput };
* const Joke = z.object({
* setup: z.string().describe("The setup of the joke"),
* punchline: z.string().describe("The punchline to the joke"),
* rating: z.number().optional().describe("How funny the joke is, from 1 to 10")
* rating: z.number().nullable().describe("How funny the joke is, from 1 to 10")
* }).describe('Joke to tell user.');
*
* const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" });
Expand Down
2 changes: 2 additions & 0 deletions libs/langchain-openai/src/azure/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export class AzureOpenAIEmbeddings extends OpenAIEmbeddings {
this.batchSize = fields?.batchSize ?? 1;
this.azureOpenAIApiKey =
fields?.azureOpenAIApiKey ??
fields?.apiKey ??
getEnvironmentVariable("AZURE_OPENAI_API_KEY");

this.azureOpenAIApiVersion =
fields?.azureOpenAIApiVersion ??
fields?.openAIApiVersion ??
getEnvironmentVariable("AZURE_OPENAI_API_VERSION");

this.azureOpenAIBasePath =
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-openai/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ export interface ChatOpenAIFields
* const Joke = z.object({
* setup: z.string().describe("The setup of the joke"),
* punchline: z.string().describe("The punchline to the joke"),
* rating: z.number().optional().describe("How funny the joke is, from 1 to 10")
* rating: z.number().nullable().describe("How funny the joke is, from 1 to 10")
* }).describe('Joke to tell user.');
*
* const structuredLlm = llm.withStructuredOutput(Joke, {
Expand Down

0 comments on commit 043946b

Please sign in to comment.