To use this completions provider you will need to install Spyder 6 (at least 6.1.0)
To install the provider package from source, you can use pip with something like:
pip install git+https://github.com/spyder-ide/langchain-provider.git
Or from PyPI something like:
pip install langchain-provider
Also, you need to set the environment variable OPENAI_API_KEY. In case
you are actually using the OpenAI API you can get it from here
but for usage with, for example, local LLMs (via things like LMStudio)
you will need to set it with a corresponding valid value.
Depending on the API you are using and options to configure available, defining the following JSON schema for the model structured output could be useful:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Generated schema for responses",
"type": "object",
"properties": {
"suggestions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"suggestions"
]
}To configure the provider number of suggestions (1 - 10), the model to use and API URL you can click on the Langchain status bar and then the Change provider parameters menu entry:
This project depends on Spyder.
Visit our CHANGELOG file to know more about our new features and improvements.
Everyone is welcome to contribute! See our Contributing guide for more details.
Spyder is funded thanks to the generous support of
and the donations we have received from our users around the world through Open Collective:



