Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeukfei02/sanguozhi-llm
sanguozhi-llm
https://github.com/yeukfei02/sanguozhi-llm
chromadb embedding generative-ai llama3 llm ollama python sanguoshi sanguoyanyi streamlit vector-database
Last synced: about 1 month ago
JSON representation
sanguozhi-llm
- Host: GitHub
- URL: https://github.com/yeukfei02/sanguozhi-llm
- Owner: yeukfei02
- License: mit
- Created: 2024-08-23T14:52:32.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T09:54:16.000Z (5 months ago)
- Last Synced: 2024-11-03T08:42:06.210Z (3 months ago)
- Topics: chromadb, embedding, generative-ai, llama3, llm, ollama, python, sanguoshi, sanguoyanyi, streamlit, vector-database
- Language: Python
- Homepage:
- Size: 104 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sanguozhi-llm
sanguozhi-llm
Data source: `三國志`, `三國演義`, `三國志十遊戲`
This project aims to generate text using the `Ollama Llama 3` model with integrated embeddings and a vector database.
Models and Tools:
LLM Model: `digimonster/llama3-chinese-response`
Purpose: Generates responses in Chinese characters.
Embedding Model: `shaw/dmeta-embedding-zh`
Purpose: Provides Chinese character embeddings.
Vector Database: `chromadb`
Description: An AI-native, open-source vector database for efficient data retrieval and storage.
documentation:
api url:
web url:
## Requirement
- install python (v3.12)
- install ollama llama (v3)## Testing and run
```zsh
// install dependencies
$ cd packages/api
$ pip install -r requirements.txt// pull llm model
$ ollama pull digimonster/llama3-chinese-response// pull embedding model
$ ollama pull shaw/dmeta-embedding-zh// seed chromadb
$ cd packages/api
$ python seed_chromadb.py// run ollama
$ cd packages/api
$ sh run-ollama.sh// run in dev
$ cd packages/api
$ fastapi dev main.py// run in prod
$ cd packages/api
$ fastapi run main.py
or
$ uvicorn main:app --host 0.0.0.0 --port 80
``````zsh
// install dependencies
$ cd packages/web
$ pip install -r requirements.txt// open sanguozhi_llm web
$ streamlit run sanguozhi_llm.py
```