Skip to content

Commit

Permalink
Update cookbook (#3220)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Nov 10, 2023
1 parent 808b496 commit ccb6a44
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cookbook/openai_vision_multimodal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"AIMessage {\n",
" lc_serializable: \u001b[33mtrue\u001b[39m,\n",
" lc_kwargs: {\n",
" content: \u001b[32m'The image features the word \"LangChain\" in black lettering. To the left of the text, there is a grap'\u001b[39m... 109 more characters,\n",
" additional_kwargs: { function_call: \u001b[90mundefined\u001b[39m }\n",
" content: \u001b[32m'The image says \"LangChain\". It includes a graphic of a parrot on the left, two interlinked rings (or'\u001b[39m... 105 more characters,\n",
" additional_kwargs: { function_call: \u001b[90mundefined\u001b[39m, tool_calls: \u001b[90mundefined\u001b[39m }\n",
" },\n",
" lc_namespace: [ \u001b[32m\"langchain\"\u001b[39m, \u001b[32m\"schema\"\u001b[39m ],\n",
" content: \u001b[32m'The image features the word \"LangChain\" in black lettering. To the left of the text, there is a grap'\u001b[39m... 109 more characters,\n",
" content: \u001b[32m'The image says \"LangChain\". It includes a graphic of a parrot on the left, two interlinked rings (or'\u001b[39m... 105 more characters,\n",
" name: \u001b[90mundefined\u001b[39m,\n",
" additional_kwargs: { function_call: \u001b[90mundefined\u001b[39m }\n",
" additional_kwargs: { function_call: \u001b[90mundefined\u001b[39m, tool_calls: \u001b[90mundefined\u001b[39m }\n",
"}"
]
},
Expand All @@ -38,10 +38,10 @@
}
],
"source": [
"Deno.env.set(\"OPENAI_API_KEY\", \"\");\n",
"// Deno.env.set(\"OPENAI_API_KEY\", \"\");\n",
"\n",
"import { ChatOpenAI } from \"npm:[email protected].182-rc.0/chat_models/openai\";\n",
"import { HumanMessage } from \"npm:[email protected].182-rc.0/schema\";\n",
"import { ChatOpenAI } from \"npm:[email protected].185/chat_models/openai\";\n",
"import { HumanMessage } from \"npm:[email protected].185/schema\";\n",
"\n",
"const chat = new ChatOpenAI({\n",
" modelName: \"gpt-4-vision-preview\",\n",
Expand Down Expand Up @@ -81,7 +81,7 @@
{
"data": {
"text/plain": [
"\u001b[32m`Avast, ye be lookin' at words that spell out \"LangChain,\" with a colorful parrot on the port side an`\u001b[39m... 57 more characters"
"\u001b[32m`Arrr, matey! The image be showin' the text \"LangChain,\" with a colorful parrot on the port side and `\u001b[39m... 52 more characters"
]
},
"execution_count": 2,
Expand All @@ -90,8 +90,8 @@
}
],
"source": [
"import { ChatPromptTemplate, MessagesPlaceholder } from \"npm:[email protected].182-rc.0/prompts\";\n",
"import { StringOutputParser } from \"npm:[email protected].182-rc.0/schema/output_parser\";\n",
"import { ChatPromptTemplate, MessagesPlaceholder } from \"npm:[email protected].185/prompts\";\n",
"import { StringOutputParser } from \"npm:[email protected].185/schema/output_parser\";\n",
"\n",
"const prompt = ChatPromptTemplate.fromMessages([\n",
" [\"system\", \"Answer all questions like a pirate.\"],\n",
Expand Down Expand Up @@ -122,7 +122,7 @@
{
"data": {
"text/plain": [
"\u001b[32m\"Arrr! That be a fine image of a hot dog ye have there! A grilled sausage nestled betwixt halves of a\"\u001b[39m... 84 more characters"
"\u001b[32m\"Arrr, matey! What ye be starin' at is a fine image of a hot dog, perched in a soft bun, ready to be \"\u001b[39m... 182 more characters"
]
},
"execution_count": 3,
Expand Down

0 comments on commit ccb6a44

Please sign in to comment.