Skip to content

spyder-ide/langchain-provider

Repository files navigation

Langchain-provider

Project Info

Project License Join the chat at https://gitter.im/spyder-ide/public OpenCollective Backers OpenCollective Sponsors


Overview

Installation

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"
  ]
}

Preview

langchain provider demo

Configuration

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:

langchain provider config

Dependencies

This project depends on Spyder.

Changelog

Visit our CHANGELOG file to know more about our new features and improvements.

Development and contribution

Everyone is welcome to contribute! See our Contributing guide for more details.

Sponsors

Spyder is funded thanks to the generous support of

QuansightNumfocus

and the donations we have received from our users around the world through Open Collective:

Sponsors

More information

Main Website

Download Spyder (with Anaconda)

Online Documentation

Spyder Github

Troubleshooting Guide and FAQ

Development Wiki

Gitter Chatroom

Google Group

@Spyder_IDE on Twitter

@SpyderIDE on Facebook

Support Spyder on OpenCollective

About

Basic completions provider using Langchain and OpenAI like APIs for Spyder 6+

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors

Languages