kyuubi/docs
Cheng Pan f1eb449c42
[KYUUBI #4544] Initial implement Kyuubi Chat Engine
### _Why are the changes needed?_

Introduce a brand new CHAT engine, it's supposed to support different backends, e.g. ChatGPT, 文心一言, etc.

This PR implements the following providers:

- ECHO, simply replies a welcome message.
- GPT: a.k.a ChatGPT, powered by OpenAI, which requires a API key for authentication. https://platform.openai.com/account/api-keys

Add the following configurations in `kyuubi-defaults.conf`
```
kyuubi.engine.chat.provider=[ECHO|GPT]
kyuubi.engine.chat.gpt.apiKey=<chat-gpt-api-key>
```

Open an ECHO beeline chat engine.
```
beeline -u 'jdbc:hive2://localhost:10009/?kyuubi.engine.type=CHAT;kyuubi.engine.chat.provider=ECHO'
```

```
Connecting to jdbc:hive2://localhost:10009/
Connected to: Kyuubi Chat Engine (version 1.8.0-SNAPSHOT)
Driver: Kyuubi Project Hive JDBC Client (version 1.7.0)
Beeline version 1.7.0 by Apache Kyuubi
0: jdbc:hive2://localhost:10009/> Hello, Kyuubi!;
+----------------------------------------+
|                 reply                  |
+----------------------------------------+
| This is ChatKyuubi, nice to meet you!  |
+----------------------------------------+
1 row selected (0.397 seconds)
```

Open a ChatGPT beeline chat engine. (make sure your network can connect the open API and configure the API key)
```
beeline -u 'jdbc:hive2://localhost:10009/?kyuubi.engine.type=CHAT;kyuubi.engine.chat.provider=GPT'
```

<img width="1109" alt="image" src="https://user-images.githubusercontent.com/26535726/225813625-a002e6e2-3b0d-4194-b061-2e215d58ba94.png">

### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [x] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4544 from pan3793/chatgpt.

Closes #4544

87bdebb6d [Cheng Pan] nit
f7dee18f3 [Cheng Pan] Update docs
9beb55162 [cxzl25] chat api (#1)
af38bdc7c [Cheng Pan] update docs
9aa6d83a6 [Cheng Pan] Initial implement Kyuubi Chat Engine

Lead-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: cxzl25 <cxzl25@users.noreply.github.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-03-17 13:39:30 +08:00
..
_static/css [KYUUBI #2764] [DOCS] Fix tables in docs being coverd by right toc sidebar 2022-05-27 17:21:42 +08:00
appendix [KYUUBI #4235] [DOCS] Prefer https:// URLs in docs 2023-02-03 14:01:11 +08:00
client [KYUUBI #3739][FOLLOWUP][REST] Remove unused parameters in SessionsResource rest docs 2023-03-16 17:04:02 +08:00
community [KYUUBI #4385] [DOCS] Refine release process 2023-02-21 09:47:45 +08:00
connector [KYUUBI #3081][DOCS] Add Hudi connector doc in Trino 2023-02-19 18:55:31 +08:00
deployment [KYUUBI #4544] Initial implement Kyuubi Chat Engine 2023-03-17 13:39:30 +08:00
develop_tools [KYUUBI #4397] [BUILD] build/dist supports --web-ui 2023-02-23 11:45:58 +08:00
extensions [KYUUBI #4330] Non-temporary views do not resolve to a specific real table 2023-03-16 12:58:41 +08:00
imgs [KYUUBI #4371] Fix typo in kyuubi_ecosystem.drawio 2023-02-20 13:00:45 +08:00
monitor [KYUUBI #4364] Add metrics for user opened connections with session type 2023-02-18 14:52:00 +08:00
overview [KYUUBI #4235] [DOCS] Prefer https:// URLs in docs 2023-02-03 14:01:11 +08:00
quick_start [KYUUBI #4338] Bump Spark from 3.3.1 to 3.3.2 2023-02-19 00:06:57 +08:00
security [KYUUBI #4362] Add _configurations in kerberos.rst 2023-02-19 00:34:22 +08:00
tools [KYUUBI #4360] Support to refresh the unlimited users for session limiter 2023-02-18 00:54:11 +08:00
conf.py [KYUUBI #4020] remove incubating from kyuubi source code 2023-01-04 09:43:20 +08:00
index.rst [KYUUBI #3763] [DOCS] Update the home page of documentation to keep the latest updates 2022-11-07 14:11:24 +08:00
make.bat [KYUUBI #4235] [DOCS] Prefer https:// URLs in docs 2023-02-03 14:01:11 +08:00
Makefile
requirements.txt [KYUUBI #4340] Bump up markdown version from 3.3.7 to 3.4.1 2023-02-16 16:27:19 +08:00