@ -49,18 +49,6 @@
"Original OpenAI call"
"Original OpenAI call"
]
]
},
},
{
"cell_type": "code",
"execution_count": 14,
"id": "e1d27dfa",
"metadata": {},
"outputs": [],
"source": [
"result = openai.ChatCompletion.create(\n",
" messages=messages, model=\"gpt-3.5-turbo\", temperature=0\n",
")"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 15,
"execution_count": 15,
@ -79,6 +67,9 @@
}
}
],
],
"source": [
"source": [
"result = openai.ChatCompletion.create(\n",
" messages=messages, model=\"gpt-3.5-turbo\", temperature=0\n",
")\n",
"result[\"choices\"][0][\"message\"].to_dict_recursive()"
"result[\"choices\"][0][\"message\"].to_dict_recursive()"
]
]
},
},
@ -90,18 +81,6 @@
"LangChain OpenAI wrapper call"
"LangChain OpenAI wrapper call"
]
]
},
},
{
"cell_type": "code",
"execution_count": 16,
"id": "87c2d515",
"metadata": {},
"outputs": [],
"source": [
"lc_result = lc_openai.ChatCompletion.create(\n",
" messages=messages, model=\"gpt-3.5-turbo\", temperature=0\n",
")"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 17,
"execution_count": 17,
@ -120,6 +99,9 @@
}
}
],
],
"source": [
"source": [
"lc_result = lc_openai.ChatCompletion.create(\n",
" messages=messages, model=\"gpt-3.5-turbo\", temperature=0\n",
")\n",
"lc_result[\"choices\"][0][\"message\"]"
"lc_result[\"choices\"][0][\"message\"]"
]
]
},
},
@ -131,18 +113,6 @@
"Swapping out model providers"
"Swapping out model providers"
]
]
},
},
{
"cell_type": "code",
"execution_count": 18,
"id": "7a2c011c",
"metadata": {},
"outputs": [],
"source": [
"lc_result = lc_openai.ChatCompletion.create(\n",
" messages=messages, model=\"claude-2\", temperature=0, provider=\"ChatAnthropic\"\n",
")"
]
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 19,
"execution_count": 19,
@ -161,6 +131,9 @@
}
}
],
],
"source": [
"source": [
"lc_result = lc_openai.ChatCompletion.create(\n",
" messages=messages, model=\"claude-2\", temperature=0, provider=\"ChatAnthropic\"\n",
")\n",
"lc_result[\"choices\"][0][\"message\"]"
"lc_result[\"choices\"][0][\"message\"]"
]
]
},
},
@ -302,7 +275,7 @@
"name": "python",
"name": "python",
"nbconvert_exporter": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"pygments_lexer": "ipython3",
"version": "3.10.1"
"version": "3.10.12 "
}
}
},
},
"nbformat": 4,
"nbformat": 4,