mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-12 12:37:14 +00:00
refactor: Modify default webserver port to 5670 (#1410)
This commit is contained in:
@@ -61,7 +61,7 @@ class Client:
|
||||
|
||||
Args:
|
||||
api_base: Optional[str], a full URL for the DB-GPT API.
|
||||
Defaults to the `http://localhost:5000/api/v2`.
|
||||
Defaults to the `http://localhost:5670/api/v2`.
|
||||
api_key: Optional[str], The dbgpt api key to use for authentication.
|
||||
Defaults to None.
|
||||
timeout: Optional[httpx._types.TimeoutTypes]: The timeout to use.
|
||||
@@ -77,14 +77,14 @@ class Client:
|
||||
|
||||
from dbgpt.client import Client
|
||||
|
||||
DBGPT_API_BASE = "http://localhost:5000/api/v2"
|
||||
DBGPT_API_BASE = "http://localhost:5670/api/v2"
|
||||
DBGPT_API_KEY = "dbgpt"
|
||||
client = Client(api_base=DBGPT_API_BASE, api_key=DBGPT_API_KEY)
|
||||
client.chat(model="chatgpt_proxyllm", messages="Hello?")
|
||||
"""
|
||||
if not api_base:
|
||||
api_base = os.getenv(
|
||||
"DBGPT_API_BASE", f"http://localhost:5000/{CLIENT_API_PATH}/{version}"
|
||||
"DBGPT_API_BASE", f"http://localhost:5670/{CLIENT_API_PATH}/{version}"
|
||||
)
|
||||
if not api_key:
|
||||
api_key = os.getenv("DBGPT_API_KEY")
|
||||
@@ -146,7 +146,7 @@ class Client:
|
||||
|
||||
from dbgpt.client import Client
|
||||
|
||||
DBGPT_API_BASE = "http://localhost:5000/api/v2"
|
||||
DBGPT_API_BASE = "http://localhost:5670/api/v2"
|
||||
DBGPT_API_KEY = "dbgpt"
|
||||
client = Client(api_base=DBGPT_API_BASE, api_key=DBGPT_API_KEY)
|
||||
res = await client.chat(model="chatgpt_proxyllm", messages="Hello?")
|
||||
@@ -222,7 +222,7 @@ class Client:
|
||||
|
||||
from dbgpt.client import Client
|
||||
|
||||
DBGPT_API_BASE = "http://localhost:5000/api/v2"
|
||||
DBGPT_API_BASE = "http://localhost:5670/api/v2"
|
||||
DBGPT_API_KEY = "dbgpt"
|
||||
client = Client(api_base=DBGPT_API_BASE, api_key=DBGPT_API_KEY)
|
||||
res = await client.chat_stream(model="chatgpt_proxyllm", messages="Hello?")
|
||||
|
Reference in New Issue
Block a user