mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
config is now backed by pydantic (WIP)
- add models for config options - add function to regenerate config.yml - replace references to config with pydantic compatible references - remove unnecessary unwrap() statements TODO: - auto generate env vars - auto generate argparse - test loading a model
This commit is contained in:
@@ -58,9 +58,7 @@ async def completion_request(
|
||||
if isinstance(data.prompt, list):
|
||||
data.prompt = "\n".join(data.prompt)
|
||||
|
||||
disable_request_streaming = unwrap(
|
||||
config.developer.get("disable_request_streaming"), False
|
||||
)
|
||||
disable_request_streaming = config.developer.disable_request_streaming
|
||||
|
||||
# Set an empty JSON schema if the request wants a JSON response
|
||||
if data.response_format.type == "json":
|
||||
@@ -117,9 +115,7 @@ async def chat_completion_request(
|
||||
if data.response_format.type == "json":
|
||||
data.json_schema = {"type": "object"}
|
||||
|
||||
disable_request_streaming = unwrap(
|
||||
config.developer.get("disable_request_streaming"), False
|
||||
)
|
||||
disable_request_streaming = config.developer.disable_request_streaming
|
||||
|
||||
if data.stream and not disable_request_streaming:
|
||||
return EventSourceResponse(
|
||||
|
||||
Reference in New Issue
Block a user