forked from phoenix/litellm-mirror
add config
This commit is contained in:
parent
fb285c8c9f
commit
27cc3760b7
5 changed files with 48 additions and 3 deletions
|
@ -709,3 +709,19 @@ class CustomStreamWrapper:
|
|||
completion_obj["content"] = chunk.text
|
||||
# return this for all models
|
||||
return {"choices": [{"delta": completion_obj}]}
|
||||
|
||||
|
||||
|
||||
########## Reading Config File ############################
|
||||
def read_config_args(config_path):
|
||||
try:
|
||||
import os
|
||||
current_path = os.getcwd()
|
||||
with open(config_path, "r") as config_file:
|
||||
config = json.load(config_file)
|
||||
|
||||
# read keys/ values from config file and return them
|
||||
return config
|
||||
except Exception as e:
|
||||
print("An error occurred while reading config:", str(e))
|
||||
raise e
|
Loading…
Add table
Add a link
Reference in a new issue