Skip to content

Commit

Permalink
revert demo notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang committed Oct 12, 2023
1 parent b79bbdf commit 58cf84c
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions tutorials/internal/llama_index_tracing_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"from llama_index.callbacks import CallbackManager\n",
"from llama_index.embeddings.openai import OpenAIEmbedding\n",
"from llama_index.graph_stores.simple import SimpleGraphStore\n",
"from llama_index.indices.postprocessor.cohere_rerank import CohereRerank\n",
"from phoenix.trace.llama_index import (\n",
" OpenInferenceTraceCallbackHandler,\n",
")\n",
Expand All @@ -76,11 +75,7 @@
"if not (openai_api_key := os.getenv(\"OPENAI_API_KEY\")):\n",
" openai_api_key = getpass(\"🔑 Enter your OpenAI API key: \")\n",
"openai.api_key = openai_api_key\n",
"os.environ[\"OPENAI_API_KEY\"] = openai_api_key\n",
"\n",
"if not (cohere_api_key := os.getenv(\"COHERE_API_KEY\")):\n",
" cohere_api_key = getpass(\"🔑 Enter your COHERE API key: \")\n",
"os.environ[\"COHERE_API_KEY\"] = cohere_api_key"
"os.environ[\"OPENAI_API_KEY\"] = openai_api_key"
]
},
{
Expand Down Expand Up @@ -145,10 +140,7 @@
" storage_context,\n",
" service_context=service_context,\n",
")\n",
"reranker = CohereRerank(top_n=2)\n",
"query_engine = index.as_query_engine(\n",
" node_postprocessors=[reranker],\n",
")"
"query_engine = index.as_query_engine()"
]
},
{
Expand All @@ -175,15 +167,6 @@
"queries"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"px.launch_app()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 58cf84c

Please sign in to comment.