Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions notebooks/module_0/rag_application.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from langsmith import traceable\n",
"from openai import OpenAI\n",
"from openai.types.chat.chat_completion import ChatCompletion\n",
"from typing import List\n",
"import nest_asyncio\n",
"from utils import get_vector_db_retriever\n",
Expand Down Expand Up @@ -127,7 +128,7 @@
"@traceable(run_type=\"llm\")\n",
"def call_openai(\n",
" messages: List[dict], model: str = MODEL_NAME, temperature: float = 0.0\n",
") -> str:\n",
") -> ChatCompletion:\n",
" return openai_client.chat.completions.create(\n",
" model=model,\n",
" messages=messages,\n",
Expand Down