-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change all prints to logging. Lots of minor fixes
- Loading branch information
1 parent
f1d2848
commit ef3cc93
Showing
6 changed files
with
45 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
""" | ||
import uuid | ||
from pydantic_settings import SettingsConfigDict, BaseSettings | ||
import logging | ||
|
||
|
||
class Settings(BaseSettings): | ||
OPENAI_API_KEY: str = "" # The OpenAI API key | ||
DRY_RUN: bool = True # If true, don't send to the OpenAI API | ||
SYSTEM_PROMPT: str = "" # the system role prompt part to prime GPT in the right direction. | ||
SESSION_UUID: uuid.UUID = uuid.uuid4() # the "End-user ID" field for the OpenAI API | ||
USE_MS_AZURE: bool = True # go via MS AZURE's API which basically proxies OpenaI, but hey, it's GDPR compliant. *shrug* | ||
API_BASE: str = "" # only needed in case we need to go via MS Azure. | ||
model_config = SettingsConfigDict(env_file='.env') | ||
""" | ||
# Configure logging | ||
logging.basicConfig(level=logging.INFO, | ||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | ||
datefmt='%Y-%m-%d %H:%M:%S') | ||
|
||
log = logging.getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,7 +253,7 @@ <h3>Summarize this</h3> | |
<footer class="footer"> | ||
<div class="container is-fluid"> | ||
<div class="content has-text-centered"> | ||
<font size="-1">Version: 0.2. Copyright 2023 (C) by Aaron Kaplan. All rights reserved.<a | ||
<font size="-1">Version: 0.3. Copyright 2023-2024 (C) by Aaron Kaplan. All rights reserved.<a | ||
href="mailto:[email protected]">E-mail</a>.<p></p> | ||
<p class="font-size-8">Made with <font color="red">❤</font> in Vienna</p> | ||
</font> | ||
|
@@ -293,4 +293,4 @@ <h3>Summarize this</h3> | |
}); | ||
</script> | ||
|
||
</html> | ||
</html> |