Completions API
Once the Mind is created, you can chat with the Mind using the OpenAI-compatible Completions API. Therefore to follow this code, if you haven’t already, install the OpenAI SDK by running pip install openai
, and use the Minds API key and name of the Mind you created.
The following code lets you chat with your Mind.
Alternatively, continue using the Minds SDK to access the OpenAI-compatible Completions API by calling the completion
function on the mind
object.
Here is the output:
Stream Mind’s Thoughts
This feature enables you to stream the thoughts of the Mind, which includes all the steps the Mind takes to answer the question.
Alternatively, continue using the Minds SDK to access the OpenAI-compatible Completions API by calling the completion
function on the mind
object.
Here is the output: