File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 24
24
25
25
from __future__ import annotations
26
26
27
+ import argparse
27
28
import os
28
29
import sys
29
- import argparse
30
30
31
31
import uvicorn
32
32
33
33
from llama_cpp .server .app import create_app
34
+ from llama_cpp .server .cli import add_args_from_model , parse_model_from_args
34
35
from llama_cpp .server .settings import (
35
- Settings ,
36
- ServerSettings ,
37
- ModelSettings ,
38
36
ConfigFileSettings ,
37
+ ModelSettings ,
38
+ ServerSettings ,
39
+ Settings ,
39
40
)
40
- from llama_cpp .server .cli import add_args_from_model , parse_model_from_args
41
41
42
42
43
43
def main ():
@@ -62,9 +62,10 @@ def main():
62
62
with open (config_file , "rb" ) as f :
63
63
# Check if yaml file
64
64
if config_file .endswith (".yaml" ) or config_file .endswith (".yml" ):
65
- import yaml
66
65
import json
67
66
67
+ import yaml
68
+
68
69
config_file_settings = ConfigFileSettings .model_validate_json (
69
70
json .dumps (yaml .safe_load (f ))
70
71
)
You can’t perform that action at this time.
0 commit comments