mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 21:37:20 +08:00
一些默认参数
This commit is contained in:
parent
a401779120
commit
3c4e8dadd6
@ -24,6 +24,6 @@ xinference:
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
server_url: 'http://127.0.0.1:9997/'
|
||||
model_uid: 'gpt-3.5-turbo'
|
||||
model_uid: 'chatglm3-6b'
|
||||
|
||||
|
||||
|
||||
@ -398,14 +398,16 @@ class RESTFulOpenAIBootstrapBaseWeb(OpenAIBootstrapBaseWeb):
|
||||
_convert_to_message(message) for message in chat_request.messages
|
||||
]
|
||||
|
||||
tools = [
|
||||
PromptMessageTool(
|
||||
name=f.function.name,
|
||||
description=f.function.description,
|
||||
parameters=f.function.parameters,
|
||||
)
|
||||
for f in chat_request.tools
|
||||
]
|
||||
tools = []
|
||||
if chat_request.tools:
|
||||
tools = [
|
||||
PromptMessageTool(
|
||||
name=f.function.name,
|
||||
description=f.function.description,
|
||||
parameters=f.function.parameters,
|
||||
)
|
||||
for f in chat_request.tools
|
||||
]
|
||||
if chat_request.functions:
|
||||
tools.extend(
|
||||
[
|
||||
|
||||
@ -140,11 +140,11 @@ class ChatCompletionRequest(BaseModel):
|
||||
tools: Optional[List[FunctionAvailable]] = None
|
||||
functions: Optional[List[FunctionDefinition]] = None
|
||||
function_call: Optional[FunctionCallDefinition] = None
|
||||
temperature: Optional[float] = None
|
||||
top_p: Optional[float] = None
|
||||
temperature: Optional[float] = 0.75
|
||||
top_p: Optional[float] = 0.75
|
||||
top_k: Optional[float] = None
|
||||
n: int = 1
|
||||
max_tokens: Optional[int] = None
|
||||
max_tokens: Optional[int] = 256
|
||||
stop: Optional[list[str]] = None
|
||||
stream: Optional[bool] = False
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user