Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ainoya/gpt-looker
Looker + OpenAI GPT-3 + LangChain Demo application
https://github.com/ainoya/gpt-looker
gpt-3 langchain-python looker natural-language-processing openai question-answering
Last synced: 10 days ago
JSON representation
Looker + OpenAI GPT-3 + LangChain Demo application
- Host: GitHub
- URL: https://github.com/ainoya/gpt-looker
- Owner: ainoya
- License: mit
- Created: 2023-03-25T08:56:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-27T05:16:15.000Z (5 months ago)
- Last Synced: 2024-10-17T23:02:29.139Z (20 days ago)
- Topics: gpt-3, langchain-python, looker, natural-language-processing, openai, question-answering
- Language: Python
- Homepage:
- Size: 211 KB
- Stars: 22
- Watchers: 3
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Looker Data Access with Natural Language using OpenAI and LangChain
![Demo App](images/demo.png)
This repository contains a demo application that uses OpenAI and LangChain to interact with Looker and output data based on natural language questions in English and other languages.
## Features
- Retrieve data from Looker by asking questions in English and other languages
- Utilizes OpenAI and LangChain for language understanding and translation
- Converts natural language questions into Looker API requests using GPT-3 (text-davinci-003)
- Supports local LookML embeddings## Getting Started
1. Clone this repository to your local machine.
1. Install the required dependencies using the following command:```bash
pip install -r requirements.txt
```1. Place the `looker.ini` file in the root directory of the project.
1. Set the environment variables `LOOKER_MODEL_NAME` and `LOOKML_DIR` to the appropriate values for your Looker model and LookML directory:
```bash
export LOOKER_MODEL_NAME=
export LOOKML_DIR=
export OPENAI_API_KEY=
```1. Run app.py to start the Streamlit application:
```bash
streamlit run app.py
```1. Open the Streamlit application in your web browser using the provided URL.
## Usage
1. Input your question in the text box, either in English or any other natural language.
1. Press "Send" to send the question to the application.
1. The application will process the question using OpenAI and LangChain, converting it into a Looker API request.
1. View the retrieved data from Looker displayed on the screen.## Future Work
- Integrate this application with ChatGPT to enable seamless communication between the two platforms and further enhance the natural language processing capabilities.
- Implement a smarter search indexing for Retrieval QA using [lkml](https://github.com/joshtemple/lkml) to improve the overall search experience.
- Integrate with [ChatGPT Plugin](https://platform.openai.com/docs/plugins/introduction).## LICENSE
This project is licensed under the terms of the MIT license.