Skip to main content

Langchain based completions provider for Spyder

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_provider-0.2.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_provider-0.2.0-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

Details for the file langchain_provider-0.2.0.tar.gz.

File metadata

  • Download URL: langchain_provider-0.2.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.20

File hashes

Hashes for langchain_provider-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0da29b4d0ba0cea5f68fdeac76359a6ad2dd75d1ab5f9363ebb231cdb8a772e0
MD5 5805acab91f9a75ba2b6532c741031ef
BLAKE2b-256 c12b581895bd5a460fe5ef9758c88966dddbdd8db40ed22d51db340fd5280f98

See more details on using hashes here.

File details

Details for the file langchain_provider-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_provider-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23797bf77ee9ed71ffc355a7e31b7adce215150f894c3b827bc891854c410494
MD5 aba878ac99bad405dcc121275f180d41
BLAKE2b-256 5490075c40fc97429ce6b9210ba7846fdc8d39824761a45cda9287e822f52f49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page