mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 04:12:13 +00:00
doc:update api docs
This commit is contained in:
parent
75f086a41d
commit
01ea5f8064
@ -48,7 +48,14 @@ DBGPT_API_KEY = "dbgpt"
|
||||
APP_ID="{YOUR_APP_ID}"
|
||||
|
||||
client = Client(api_key=DBGPT_API_KEY)
|
||||
response = client.chat_stream(messages="Introduce AWEL", model="chatgpt_proxyllm", chat_mode="chat_app", chat_param=APP_ID)
|
||||
|
||||
async for data in client.chat_stream(
|
||||
messages="Introduce AWEL",
|
||||
model="chatgpt_proxyllm",
|
||||
chat_mode="chat_app",
|
||||
chat_param=APP_ID):
|
||||
print(data)
|
||||
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
@ -45,8 +45,12 @@ import TabItem from '@theme/TabItem';
|
||||
from dbgpt.client.client import Client
|
||||
|
||||
DBGPT_API_KEY = "dbgpt"
|
||||
client = Client(api_key=DBGPT_API_KEY)
|
||||
response = client.chat_stream(messages="Hello", model="chatgpt_proxyllm")
|
||||
|
||||
async for data in client.chat_stream(
|
||||
model="chatgpt_proxyllm",
|
||||
messages="hello",
|
||||
):
|
||||
print(data)
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -104,7 +108,7 @@ from dbgpt.client.client import Client
|
||||
|
||||
DBGPT_API_KEY = "dbgpt"
|
||||
client = Client(api_key=DBGPT_API_KEY)
|
||||
response = client.chat(messages="Hello", model="chatgpt_proxyllm")
|
||||
response = await client.chat(model="chatgpt_proxyllm" ,messages="hello")
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
@ -48,7 +48,12 @@ DBGPT_API_KEY = "dbgpt"
|
||||
FLOW_ID="{YOUR_FLOW_ID}"
|
||||
|
||||
client = Client(api_key=DBGPT_API_KEY)
|
||||
response = client.chat_stream(messages="Hello", model="chatgpt_proxyllm", chat_mode="chat_flow", chat_param=FLOW_ID)
|
||||
async for data in client.chat_stream(
|
||||
messages="Introduce AWEL",
|
||||
model="chatgpt_proxyllm",
|
||||
chat_mode="chat_flow",
|
||||
chat_param=FLOW_ID):
|
||||
print(data)
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
@ -47,7 +47,13 @@ DBGPT_API_KEY = "dbgpt"
|
||||
SPACE_NAME="{YOUR_SPACE_NAME}"
|
||||
|
||||
client = Client(api_key=DBGPT_API_KEY)
|
||||
response = client.chat_stream(messages="Hello", model="chatgpt_proxyllm", chat_mode="chat_knowledge", chat_param=SPACE_NAME)
|
||||
|
||||
async for data in client.chat_stream(
|
||||
messages="Introduce AWEL",
|
||||
model="chatgpt_proxyllm",
|
||||
chat_mode="chat_knowledge",
|
||||
chat_param=SPACE_NAME):
|
||||
print(data)
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
Loading…
Reference in New Issue
Block a user