Create initial Tanuki bot api endpoint
-
Review changes -
-
Download -
Patches
-
Plain diff
What does this MR do and why?
Related https://gitlab.com/gitlab-org/enablement-section/tanuki-bot/-/issues/2
Creates an API endpoint that receives and responds with json:
POST /-/llm/tanuki_bot/ask
{ "q": "What is advanced search?" }
This is part of a series of MRs and should be reviewed and merged in this order
MR | status |
---|---|
Add support for the embedding database (!118156 - merged) (db setup) | merged ![]() |
Add the tanuki_bot model (!118195 - merged) (migration) | merged ![]() |
Create initial Tanuki bot api endpoint (!117695 - merged) (api) | in review ![]() |
Screenshots or screen recordings
How to set up and validate locally
Feature.enable(:openai_experimentation)
Feature.enable(:tanuki_bot)
::Gitlab::CurrentSettings.update!(openai_api_key: '<YOUR_KEY>')
- Follow instructions for settings up the MR dependency: Add support for the embedding database (!118156 - merged)
- Run migrations:
rails db:migrate
- * Clone the tanuki-bot repository
- * cd into the
pgvector
folder - * use asdf to install python (should be python 3.11.3)
asdf install python
- * install pip
- * install requirements
pip install -r requirements.txt
- * run the command to copy the chroma db to the gdk postgres database
OPENAI_API_KEY=not-an-actual-key PG_USER=<Your user> PG_HOST=<Your gdk install directory>/postgresql python chroma_to_pg.py
- Make an API request to
POST /-/llm/tanuki_bot/ask
* you only need to do this once to have data in the embedding database.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dmitry Gruzd
Merge request reports
Compare and
Show latest version
- version 5439c5377f
- version 53c3499921
- version 52d1a04f64
- version 51d1a04f64
- version 501cabdfa3
- version 496df6c845
- version 484b11ab4d
- version 4785722d1f
- version 46629087ff
- version 459be62654
- version 446ae42d15
- version 437fa45e42
- version 42fa9fb74a
- version 41645dbd9d
- version 404ebace43
- version 394ebace43
- version 384e435014
- version 374e435014
- version 36b919318a
- version 35b919318a
- version 34cc74643f
- version 33cc74643f
- version 32cc74643f
- version 311f3556bc
- version 30fd8ce90f
- version 29a0a8981e
- version 280d274684
- version 27386e22ba
- version 26386e22ba
- version 254b0eaeb4
- version 244b0eaeb4
- version 23d2406051
- version 22c85fffc3
- version 2121bf289a
- version 2021bf289a
- version 1921bf289a
- version 18857c4b6f
- version 17857c4b6f
- version 16857c4b6f
- version 15b2b4600e
- version 1400faa3c4
- version 13551dcd63
- version 12e56306e2
- version 116effe0ec
- version 104ccd40d5
- version 936a4b81f
- version 853c9dda8
- version 7cb8d1402
- version 67b728da7
- version 5b64f952d
- version 48dd8f6f5
- version 38dd8f6f5
- version 2d320a83b
- version 1da285338
- master (base)
- latest version3bf3b0bd3 commits,
- version 5439c5377f2 commits,
- version 53c34999212 commits,
- version 52d1a04f646 commits,
- version 51d1a04f642 commits,
- version 501cabdfa32 commits,
- version 496df6c8452 commits,
- version 484b11ab4d2 commits,
- version 4785722d1f2 commits,
- version 46629087ff2 commits,
- version 459be626545 commits,
- version 446ae42d154 commits,
- version 437fa45e423 commits,
- version 42fa9fb74a2 commits,
- version 41645dbd9d1 commit,
- version 404ebace433 commits,
- version 394ebace431 commit,
- version 384e4350143 commits,
- version 374e4350141 commit,
- version 36b919318a16 commits,
- version 35b919318a10 commits,
- version 34cc74643f17 commits,
- version 33cc74643f17 commits,
- version 32cc74643f10 commits,
- version 311f3556bc9 commits,
- version 30fd8ce90f8 commits,
- version 29a0a8981e7 commits,
- version 280d2746846 commits,
- version 27386e22ba11 commits,
- version 26386e22ba10 commits,
- version 254b0eaeb49 commits,
- version 244b0eaeb44 commits,
- version 23d24060513 commits,
- version 22c85fffc31 commit,
- version 2121bf289a33 commits,
- version 2021bf289a32 commits,
- version 1921bf289a24 commits,
- version 18857c4b6f23 commits,
- version 17857c4b6f23 commits,
- version 16857c4b6f32 commits,
- version 15b2b4600e19 commits,
- version 1400faa3c418 commits,
- version 13551dcd6317 commits,
- version 12e56306e216 commits,
- version 116effe0ec15 commits,
- version 104ccd40d514 commits,
- version 936a4b81f13 commits,
- version 853c9dda812 commits,
- version 7cb8d140211 commits,
- version 67b728da713 commits,
- version 5b64f952d12 commits,
- version 48dd8f6f511 commits,
- version 38dd8f6f53 commits,
- version 2d320a83b1 commit,
- version 1da2853381 commit,
1 file
+ 3
− 0
Compare changes
- Side-by-side
- Inline
+ 3
− 0
Loading