Skip to content

Commit 58db055

Browse files
authored
patch(openai): 0.5.18 (#8460)
2 parents 2b9fcf2 + 04d9b75 commit 58db055

File tree

321 files changed

+3042
-3221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+3042
-3221
lines changed

β€Žcookbook/rag_fusion.ipynbβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
"source": [
102102
"/** Define the chat model */\n",
103103
"const model = new ChatOpenAI({\n",
104-
" modelName: \"o4-mini\",\n",
105104
" temperature: 0,\n",
106105
"});"
107106
]

β€Žcookbook/rewrite.ipynbβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@
5858
"const prompt = PromptTemplate.fromTemplate(template);\n",
5959
"\n",
6060
"const model = new ChatOpenAI({\n",
61-
" model: \"o4-mini\",\n",
6261
" temperature: 0,\n",
63-
" apiKey: Deno.env.get(\"OPENAI_API_KEY\"),\n",
62+
" openAIApiKey: Deno.env.get(\"OPENAI_API_KEY\"),\n",
6463
"})\n",
6564
"\n",
6665
"const retriever = new TavilySearchAPIRetriever({\n",
@@ -235,7 +234,7 @@
235234
"// rewriter = rewrite_prompt | ChatOpenAI(temperature=0) | StrOutputParser() | _parse\n",
236235
"const rewriter = RunnableSequence.from([\n",
237236
" rewritePrompt,\n",
238-
" new ChatOpenAI({ model: \"o4-mini\", temperature: 0 }),\n",
237+
" new ChatOpenAI({ temperature: 0 }),\n",
239238
" new StringOutputParser(),\n",
240239
" _parse\n",
241240
"]);"

β€Žcookbook/step_back.ipynbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"source": [
124124
"// Deno.env.set(\"OPENAI_API_KEY\", \"\");\n",
125125
"\n",
126-
"const model = new ChatOpenAI({ model: \"o4-mini\", temperature: 0 });\n",
126+
"const model = new ChatOpenAI({ temperature: 0 });\n",
127127
"const stringOutputParser = new StringOutputParser();"
128128
]
129129
},

β€Ždocs/core_docs/docs/concepts/rag.mdxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const systemPromptFmt = systemPrompt.replace("{context}", docsText);
7979

8080
// Create a model
8181
const model = new ChatOpenAI({
82-
model: "gpt-4o-mini",
82+
model: "gpt-4o",
8383
temperature: 0,
8484
});
8585

β€Ždocs/core_docs/docs/concepts/retrieval.mdxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const Questions = z.object({
8585
});
8686

8787
// Create an instance of the model and enforce the output structure
88-
const model = new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 });
88+
const model = new ChatOpenAI({ modelName: "gpt-4", temperature: 0 });
8989
const structuredModel = model.withStructuredOutput(Questions);
9090

9191
// Define the system prompt
@@ -142,7 +142,7 @@ import { ChatOpenAI } from "@langchain/openai";
142142

143143
const attributeInfo: AttributeInfo[] = schemaForMetadata;
144144
const documentContents = "Brief summary of a movie";
145-
const llm = new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 });
145+
const llm = new ChatOpenAI({ temperature: 0 });
146146
const retriever = SelfQueryRetriever.fromLLM({
147147
llm,
148148
vectorStore,

β€Ždocs/core_docs/docs/concepts/structured_outputs.mdxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Here is an example using the `ResponseFormatter` schema defined above:
8686
import { ChatOpenAI } from "@langchain/openai";
8787

8888
const model = new ChatOpenAI({
89-
model: "gpt-4o-mini",
89+
modelName: "gpt-4",
9090
temperature: 0,
9191
});
9292

@@ -116,7 +116,7 @@ Here is an example of how to use JSON mode with OpenAI:
116116
import { ChatOpenAI } from "@langchain/openai";
117117

118118
const model = new ChatOpenAI({
119-
model: "gpt-4o-mini",
119+
model: "gpt-4",
120120
}).bind({
121121
response_format: { type: "json_object" },
122122
});

β€Ždocs/core_docs/docs/how_to/agent_executor.ipynbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,4 +956,4 @@
956956
},
957957
"nbformat": 4,
958958
"nbformat_minor": 5
959-
}
959+
}

β€Ždocs/core_docs/docs/how_to/assign.ipynbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@
191191
},
192192
"nbformat": 4,
193193
"nbformat_minor": 4
194-
}
194+
}

β€Ždocs/core_docs/docs/how_to/binding.ipynbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
" ]\n",
8282
")\n",
8383
"\n",
84-
"const model = new ChatOpenAI({ model: \"gpt-4o\", temperature: 0 });\n",
84+
"const model = new ChatOpenAI({ temperature: 0 });\n",
8585
"\n",
8686
"const runnable = prompt.pipe(model).pipe(new StringOutputParser());\n",
8787
"\n",

β€Ždocs/core_docs/docs/how_to/chatbots_tools.ipynbβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,4 +508,4 @@
508508
},
509509
"nbformat": 4,
510510
"nbformat_minor": 4
511-
}
511+
}

0 commit comments

Comments
Β (0)