Debug logs
This commit is contained in:
@@ -10,6 +10,10 @@ AI_MODEL_THINK = os.getenv("OPENAI_MODEL_THINK", "True").lower() in ("true", "1"
|
|||||||
OPENAPI_TOKEN = os.getenv("OPENAI_API_TOKEN", None)
|
OPENAPI_TOKEN = os.getenv("OPENAI_API_TOKEN", None)
|
||||||
OPENAPI_ENDPOINT = "/api/generate"
|
OPENAPI_ENDPOINT = "/api/generate"
|
||||||
|
|
||||||
|
print(f"Using API Host: {API_HOST}")
|
||||||
|
print(f"Using API Model: {AI_MODEL}")
|
||||||
|
print(f"Using API Model Think: {AI_MODEL_THINK}")
|
||||||
|
print(f"Using API Token: {'Yes' if OPENAPI_TOKEN else 'No'} {OPENAPI_TOKEN[:5] + '...' if OPENAPI_TOKEN else ''}")
|
||||||
|
|
||||||
def call_api(body: dict, endpoint: str = OPENAPI_ENDPOINT) -> str:
|
def call_api(body: dict, endpoint: str = OPENAPI_ENDPOINT) -> str:
|
||||||
"""Call the API with the given endpoint and body dict."""
|
"""Call the API with the given endpoint and body dict."""
|
||||||
|
|||||||
Reference in New Issue
Block a user