Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ridadogrul/langchainintroduction
https://github.com/ridadogrul/langchainintroduction
fastapi langchain langchain-python openai
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ridadogrul/langchainintroduction
- Owner: RidaDogrul
- Created: 2024-12-02T16:41:23.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-02T16:50:27.000Z (about 1 month ago)
- Last Synced: 2024-12-22T15:14:55.531Z (15 days ago)
- Topics: fastapi, langchain, langchain-python, openai
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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**:
```bash
venv\Scripts\activate
```- **MacOS/Linux**:
```bash
source venv/bin/activate
```2. **Install the required dependencies**:
```bash
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