mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Improve API documentation
This commit is contained in:
parent
9be48e83a9
commit
a475aa7816
@ -261,10 +261,12 @@ async def handle_load_model(request_data: LoadModelRequest):
|
|||||||
The "args" parameter can be used to modify flags like "--load-in-4bit"
|
The "args" parameter can be used to modify flags like "--load-in-4bit"
|
||||||
or "--n-gpu-layers" before loading a model. Example:
|
or "--n-gpu-layers" before loading a model. Example:
|
||||||
|
|
||||||
|
```
|
||||||
"args": {
|
"args": {
|
||||||
"load_in_4bit": true,
|
"load_in_4bit": true,
|
||||||
"n_gpu_layers": 12
|
"n_gpu_layers": 12
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Note that those settings will remain after loading the model. So you
|
Note that those settings will remain after loading the model. So you
|
||||||
may need to change them back to load a second model.
|
may need to change them back to load a second model.
|
||||||
@ -273,9 +275,11 @@ async def handle_load_model(request_data: LoadModelRequest):
|
|||||||
shared.settings object. It can be used to modify the default instruction
|
shared.settings object. It can be used to modify the default instruction
|
||||||
template like this:
|
template like this:
|
||||||
|
|
||||||
|
```
|
||||||
"settings": {
|
"settings": {
|
||||||
"instruction_template": "Alpaca"
|
"instruction_template": "Alpaca"
|
||||||
}
|
}
|
||||||
|
```
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -99,7 +99,7 @@ class ChatCompletionRequestParams(BaseModel):
|
|||||||
system_message: str | None = Field(default=None, description="Overwrites the value set by instruction_template.")
|
system_message: str | None = Field(default=None, description="Overwrites the value set by instruction_template.")
|
||||||
|
|
||||||
character: str | None = Field(default=None, description="A character defined under text-generation-webui/characters. If not set, the default \"Assistant\" character will be used.")
|
character: str | None = Field(default=None, description="A character defined under text-generation-webui/characters. If not set, the default \"Assistant\" character will be used.")
|
||||||
name1: str | None = Field(default=None, description="Overwrites the value set by character.")
|
name1: str | None = Field(default=None, description="Your name (the user). By default, it's \"You\".")
|
||||||
name2: str | None = Field(default=None, description="Overwrites the value set by character.")
|
name2: str | None = Field(default=None, description="Overwrites the value set by character.")
|
||||||
context: str | None = Field(default=None, description="Overwrites the value set by character.")
|
context: str | None = Field(default=None, description="Overwrites the value set by character.")
|
||||||
greeting: str | None = Field(default=None, description="Overwrites the value set by character.")
|
greeting: str | None = Field(default=None, description="Overwrites the value set by character.")
|
||||||
|
Loading…
Reference in New Issue
Block a user