Chat with Bigdata.com (Sunsetting)
In just 5 minutes, you’ll learn how to: ✅ Installbigdata-client package ✅ Authenticate to Bigdata.com
✅ Chat with Bigdata.com
✅ Delete the chat instance
Ready to get started? Let’s dive in!
Each question queries Bigdata.com and consumes API units - Monitor usage accordingly.
Install bigdata-client package
First of all, let’s install bigdata-client package in a python
virtual environment.
Open the terminal and create a virtual environment with the following
command:
bigdata-client within the environment bigdata_venv.
Authenticate to bigdata.com
Enter the python interpreter with the following commandChat with bigdata.com
Your proprietary App or Server can leverage this programmatic research experience similar to the way you chat with the Bigdata Assistant App. Create a new Chat Let’s create a Chat instance:Chat support
formatter. This is the mechanism to customize
inline attribution in chat answers. By default
DefaultFormatter is used. For more information see
Inline attribution formatterInline attribution
Theresponse object contains an array of source references that the Chat Service used to ground the response into truth.
Those inline attribution references have the format :ref[i] where i is the index in the list response.sources.
Source filtering
We can also receive chat responses grounded in data from a curated list of trusted sources. We can filter Bigdata’s indexed sources that you can identify using the Knowledge Graphfind_sources method. The following example find sources by name, and it is also possible to find sources by Country and Rank, check out the page Find Sources for more details.
It is not possible to filter web sources that Bigdata has not indexed. If you have other sources essential for your use case, please reach out to support@bigdata.com to consider adding them.
source_filter
Chat with bigdata.com in Streaming mode
Chat support streaming mode Whenstreaming=True param provided to chat.ask method it returns
StreamingChatInteraction instead of ChatInteraction
StreamingChatInteraction implements iterator. Also it has
same interface as ChatInteracion and contains exactly same
properties.
Ask question with streaming
We can ask a question and print both, the question and the answer: