Skip to content

RidaDogrul/LangChainIntroduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LangChain Server API

This project creates a simple API server that provides a language translation service using the LangChain library and FastAPI. Users can use this API to translate their texts into different languages. The API is powered by the OpenAI GPT-4 model.

Features

  • Using LangChain and FastAPI to perform language translation.
  • Natural language processing using the OpenAI GPT-4 based model.
  • Secure management of sensitive information with .env file.
  • Easy to use with simple API endpoints.

Setting Up the Environment

  1. Activate the virtual environment:

    • Windows:

      venv\Scripts\activate
    • MacOS/Linux:

      source venv/bin/activate
  2. Install the required dependencies:

    pip install -r requirements.txt
    
    

Configure the .env File

You need to add the OpenAI API key and other sensitive information to the .env file. Add the following line to your .env file:

OPENAI_API_KEY=your-openai-api-key

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages