Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onepointconsulting/elasticsearch-agent
ElasticSearch agent based on ElasticSearch, LangChain and ChatGPT 4
https://github.com/onepointconsulting/elasticsearch-agent
Last synced: 3 months ago
JSON representation
ElasticSearch agent based on ElasticSearch, LangChain and ChatGPT 4
- Host: GitHub
- URL: https://github.com/onepointconsulting/elasticsearch-agent
- Owner: onepointconsulting
- Created: 2023-10-10T17:38:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-17T17:43:35.000Z (over 1 year ago)
- Last Synced: 2024-08-02T16:46:34.794Z (6 months ago)
- Language: Python
- Size: 185 KB
- Stars: 34
- Watchers: 1
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-agents - Elasticsearch Agent - agent?style=social) (Langchain Agents)
- awesome-langchain - Elasticsearch Agent - agent?style=social) (Tools / Agents)
- awesome-langchain-zh - Elasticsearch Agent - agent?style=social): 一个基于 elasticsearch,langchain,gpt4的gpt 代理 (工具 / 代理)
README
# Elasticsearch Langchain Agent
This project uses ElasticSearch together with LangChain and ChatGPT 4 to build an agent with which you can ask intelligent questions on
top of an ElasticSearch cluster.## Setup
We suggest to use [Conda](https://docs.conda.io/en/latest/) to manage the virtual environment and then install poetry.
```
conda activate base
conda remove -n elastic_search_playground --all
conda create -n elastic_search_playground python=3.11
conda activate elastic_search_playground
pip install poetry
``````## Installation
```
poetry install
```## Configuration
The configuration should be saved in a `.env` file.
```
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4-0613
# OPENAI_MODEL=gpt-3.5-turbo-16k-0613
REQUEST_TIMEOUT=300
LANGCHAIN_CACHE=false
CHATGPT_STREAMING=false
LLM_VERBOSE=true# Elastic Search related
ELASTIC_SERVER=https://127.0.0.1:9200
ELASTIC_USER=elastic
ELASTIC_PASSWORD=
ELASTIC_VERIFY_CERTIFICATES=falseELASTIC_INDEX_DATA_FROM=0
ELASTIC_INDEX_DATA_SIZE=5
ELASTIC_INDEX_DATA_MAX_SIZE=50LANGCHAIN_VERBOSE=true
AGGS_LIMIT=200
TOKEN_LIMIT=6000
MAX_SEARCH_RETRIES = 100
```Please note that the agent works best with ChatGPT 4.