GithubHelp home page GithubHelp logo

langchain-gpt4free's Introduction

LangChain gpt4free

LangChain gpt4free is an open-source project that assists in building applications using LLM (Large Language Models) and provides free access to GPT4/3.5.

Installation

To install langchain_g4f, run the following command:

pip install git+https://github.com/MIDORIBIN/langchain-gpt4free.git

This command will install langchain_g4f.

Usage

Here is an example of how to use langchain_g4f

from g4f import Provider, models
from langchain.llms.base import LLM

from langchain_g4f import G4FLLM


def main():
    llm: LLM = G4FLLM(
        model=models.gpt_35_turbo,
        provider=Provider.Aichat,
    )

    res = llm("hello")
    print(res)  # Hello! How can I assist you today?


if __name__ == "__main__":
    main()

The above sample code demonstrates the basic usage of langchain_g4f. Choose the appropriate model and provider, initialize the LLM, and then pass input text to the LLM object to obtain the result.

For other samples, please refer to the following sample directory.

Support and Bug Reports

For support and bug reports, please use the GitHub Issues page.

Access the GitHub Issues page and create a new issue. Select the appropriate label and provide detailed information.

Contributing

To contribute to langchain_g4f, follow these steps to submit a pull request:

  1. Fork the project repository.
  2. Clone the forked repository to your local machine.
  3. Make the necessary changes.
  4. Commit the changes and push to your forked repository.
  5. Create a pull request towards the original project repository.

langchain-gpt4free's People

Contributors

antoniosabbatellauni avatar ludobico avatar midoribin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.