From c25b2d6dad85a41b53dcc801040367df9e1774ea Mon Sep 17 00:00:00 2001 From: David Levy Date: Mon, 14 Oct 2024 15:17:10 +1100 Subject: [PATCH] Fixed multi-corpora API query --- examples/01_getting_started/01_query_api.ipynb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/01_getting_started/01_query_api.ipynb b/examples/01_getting_started/01_query_api.ipynb index 1ee96c9..cacd801 100644 --- a/examples/01_getting_started/01_query_api.ipynb +++ b/examples/01_getting_started/01_query_api.ipynb @@ -152,16 +152,16 @@ "collapsed": false }, "source": [ - "# Multiple Corpora Query (Not working, SDK refactor underway)\n", + "# Multiple Corpora Query\n", "We will now show how you can invoke the multiple-corpora query for advanced use cases which invoke [Multiple Corpora Query REST API](https://docs.vectara.com/docs/rest-api/query).\n", "\n", "Please note the two similarly named types:\n", - "* `vectara.queries.SearchCorpusParameters` - Used above to search a single corpus\n", + "* `vectara.corpora.types.SearchCorpusParameters` - Used above to search a single corpus\n", "* `vectara.types.SearchCorporaParameters` - Used hear to search multiple corpora\n", "\n", - "Also observe the slight difference in methods in `vectara.queries.QueryClient`:\n", - "* `QueryClient#query_corpus` - Used above to search a single corpus\n", - "* `QueryClient#query` - Used here to perform a multi-corpora query" + "Also observe the slight difference and location of query methods:\n", + "* `vectara.corpora.CorporaClient#query` - Used above to search a single corpus\n", + "* `vectara.base_client.BaseVectara#query` - Used here to perform a multi-corpora query" ] }, { @@ -179,7 +179,6 @@ " \"corpora\": [{\"corpus_key\": corpus_key}] # This can be multiple corpora\n", "})\n", "\n", - "\n", "query_response = client.query(query=query, search=search, generation=generation)\n", "display(Markdown(render_markdown(query, query_response, show_search_results=True)))" ]