Add infos for development workflow
This commit is contained in:
parent
8906306f01
commit
ae5271cda0
1 changed files with 93 additions and 0 deletions
93
README.md
93
README.md
|
|
@ -29,6 +29,99 @@ podman-compose -f docker-compose.yaml up
|
||||||
nodemon --ext '*' --exec "podman stop rag-chat-backend; podman rm rag-chat-backend; podman-compose -f docker-compose.yaml up --build"
|
nodemon --ext '*' --exec "podman stop rag-chat-backend; podman rm rag-chat-backend; podman-compose -f docker-compose.yaml up --build"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Ollama (CLI)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Show Models from Ollama</b></summary>
|
||||||
|
|
||||||
|
curl http://localhost:11434/api/tags | jq
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Run Chat Completion</b></summary>
|
||||||
|
|
||||||
|
curl http://localhost:11434/v1/chat/completions \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"model": "phi3:latest",
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"role": "system",
|
||||||
|
"content": "You are a helpful assistant."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "Hello!"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
### VectorDB (CLI)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Quere Verctoriezed content</b></summary>
|
||||||
|
|
||||||
|
curl -X 'POST' \
|
||||||
|
'http://localhost:8000/api/search-engine?query=HTML%20of%20your%20question' \
|
||||||
|
-H 'accept: application/json' | jq
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
### VectorDB (Opensearch Dashboard)
|
||||||
|
|
||||||
|
Run these at http://localhost:5601/app/dev_tools#/console
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>View Chunked Vectors</b></summary>
|
||||||
|
|
||||||
|
GET /my-project-name/_search
|
||||||
|
{
|
||||||
|
"query": {
|
||||||
|
"match_all": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Get the three best documents with theire embeddings</b></summary>
|
||||||
|
|
||||||
|
GET /my-project-name/_search
|
||||||
|
{
|
||||||
|
"size": 0,
|
||||||
|
"query": {
|
||||||
|
"bool": {"must": [{"match": {"content": "Enter your Question here..."}}]}
|
||||||
|
},
|
||||||
|
"aggs": {
|
||||||
|
"group_by_source": {
|
||||||
|
"terms": {
|
||||||
|
"field": "metadata.source.keyword",
|
||||||
|
"size": 100000
|
||||||
|
|
||||||
|
},
|
||||||
|
"aggs": {
|
||||||
|
"top_entries": {
|
||||||
|
"top_hits": {
|
||||||
|
"size": 3,
|
||||||
|
"sort": [{"_score": {"order": "desc"}}],
|
||||||
|
"_source": {"excludes": ["embedding_vector"]}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue