-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logging filters, update config namespaces (#1059)
- Loading branch information
Showing
46 changed files
with
185 additions
and
81 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
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
3 changes: 2 additions & 1 deletion
3
docs/griptape-framework/drivers/src/event_listener_drivers_4.py
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
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
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import logging | ||
|
||
from griptape.config import config | ||
from griptape.config.drivers import OpenAiDriverConfig | ||
from griptape.config.logging import TruncateLoggingFilter | ||
from griptape.structures import Agent | ||
|
||
config.drivers = OpenAiDriverConfig() | ||
|
||
logger = logging.getLogger(config.logging.logger_name) | ||
logger.setLevel(logging.ERROR) | ||
logger.addFilter(TruncateLoggingFilter(max_log_length=100)) | ||
|
||
agent = Agent() |
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,28 +1,8 @@ | ||
from .base_config import BaseConfig | ||
|
||
from .base_driver_config import BaseDriverConfig | ||
|
||
from .driver_config import DriverConfig | ||
from .openai_driver_config import OpenAiDriverConfig | ||
from .azure_openai_driver_config import AzureOpenAiDriverConfig | ||
from .amazon_bedrock_driver_config import AmazonBedrockDriverConfig | ||
from .anthropic_driver_config import AnthropicDriverConfig | ||
from .google_driver_config import GoogleDriverConfig | ||
from .cohere_driver_config import CohereDriverConfig | ||
from .logging_config import LoggingConfig | ||
from .config import config | ||
|
||
|
||
__all__ = [ | ||
"BaseConfig", | ||
"BaseDriverConfig", | ||
"DriverConfig", | ||
"OpenAiDriverConfig", | ||
"AzureOpenAiDriverConfig", | ||
"AmazonBedrockDriverConfig", | ||
"AnthropicDriverConfig", | ||
"GoogleDriverConfig", | ||
"CohereDriverConfig", | ||
"LoggingConfig", | ||
"config", | ||
] |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from .base_driver_config import BaseDriverConfig | ||
from .driver_config import DriverConfig | ||
|
||
from .openai_driver_config import OpenAiDriverConfig | ||
from .azure_openai_driver_config import AzureOpenAiDriverConfig | ||
from .amazon_bedrock_driver_config import AmazonBedrockDriverConfig | ||
from .anthropic_driver_config import AnthropicDriverConfig | ||
from .google_driver_config import GoogleDriverConfig | ||
from .cohere_driver_config import CohereDriverConfig | ||
|
||
__all__ = [ | ||
"BaseDriverConfig", | ||
"DriverConfig", | ||
"OpenAiDriverConfig", | ||
"AzureOpenAiDriverConfig", | ||
"AmazonBedrockDriverConfig", | ||
"AnthropicDriverConfig", | ||
"GoogleDriverConfig", | ||
"CohereDriverConfig", | ||
] |
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
2 changes: 1 addition & 1 deletion
2
griptape/config/anthropic_driver_config.py → ...config/drivers/anthropic_driver_config.py
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
griptape/config/cohere_driver_config.py → ...pe/config/drivers/cohere_driver_config.py
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
2 changes: 1 addition & 1 deletion
2
griptape/config/google_driver_config.py → ...pe/config/drivers/google_driver_config.py
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
2 changes: 1 addition & 1 deletion
2
griptape/config/openai_driver_config.py → ...pe/config/drivers/openai_driver_config.py
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .logging_config import LoggingConfig | ||
from .truncate_logging_filter import TruncateLoggingFilter | ||
from .newline_logging_filter import NewlineLoggingFilter | ||
|
||
__all__ = ["LoggingConfig", "TruncateLoggingFilter", "NewlineLoggingFilter"] |
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
Oops, something went wrong.