-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Config #1045
Global Config #1045
Changes from all commits
adf4836
ae20c82
44f9ebd
6b76237
e8c1fff
514665f
ef24d49
ab65783
ecfa358
582f55c
e80f78e
91619a5
9ebd44e
b7e1359
97564a2
4220e0f
f8a616f
95d83b5
951a4ed
025437b
0f19385
729f3aa
c391b14
7baefac
98fa12d
feec94b
13969c3
f5c42e8
dd23d89
39f75c4
8a97313
0e1d019
4d491c2
863bcde
c173f49
12efa67
0d5ce93
5fbb1b1
daa1710
8962648
11f9ac8
952e07f
f3c908d
d0fab25
1ff7e88
d179821
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
- Method `try_find_task` to `Structure`. | ||
- `TranslateQueryRagModule` `RagEngine` module for translating input queries. | ||
- Global event bus, `griptape.events.event_bus`, for publishing and subscribing to events. | ||
- Global config, `griptape.config.config`, for setting global configuration defaults. | ||
- Unique name generation for all `RagEngine` modules. | ||
|
||
### Changed | ||
- **BREAKING**: Removed all uses of `EventPublisherMixin` in favor of `event_bus`. | ||
- **BREAKING**: Removed `EventPublisherMixin`. | ||
- **BREAKING**: Removed `Pipeline.prompt_driver` and `Workflow.prompt_driver`. `Agent.prompt_driver` has not been removed. | ||
- **BREAKING**: Removed `Pipeline.stream` and `Workflow.stream`. `Agent.stream` has not been removed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's special about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replied above. |
||
- **BREAKING**: Removed `Structure.embedding_driver`, set this via `griptape.config.config.drivers.embedding` instead. | ||
- **BREAKING**: Removed `Structure.custom_logger` and `Structure.logger_level`, set these via `griptape.config.config.logger` instead. | ||
- **BREAKING**: Removed `BaseStructureConfig.merge_config`. | ||
- **BREAKING**: Renamed `StructureConfig` to `DriverConfig`, and renamed fields accordingly. | ||
- **BREAKING**: `RagContext.output` was changed to `RagContext.outputs` to support multiple outputs. All relevant RAG modules were adjusted accordingly. | ||
- **BREAKING**: Removed before and after response modules from `ResponseRagStage`. | ||
- **BREAKING**: Moved ruleset and metadata ingestion from standalone modules to `PromptResponseRagModule`. | ||
- Engines that previously required Drivers now pull from `griptape.config.config.drivers` by default. | ||
- `BaseTask.add_parent/child` will now call `self.structure.add_task` if possible. | ||
|
||
## [0.29.1] - 2024-08-02 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ The [CohereEmbeddingDriver](../../reference/griptape/drivers/embedding/cohere_em | |
``` | ||
|
||
### Override Default Structure Embedding Driver | ||
Here is how you can override the Embedding Driver that is used by default in Structures. | ||
Here is how you can override the Embedding Driver that is used by default in Structures. | ||
|
||
```python | ||
--8<-- "docs/griptape-framework/drivers/src/embedding_drivers_10.py" | ||
Comment on lines
-131
to
134
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separating the snippets from the docs makes proof reading more difficult There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, but the type checking/linting was essential during development. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
from griptape.config import StructureConfig | ||
from griptape.config import DriverConfig, config | ||
from griptape.drivers import ( | ||
OpenAiChatPromptDriver, | ||
VoyageAiEmbeddingDriver, | ||
) | ||
from griptape.structures import Agent | ||
from griptape.tools import TaskMemoryClient, WebScraper | ||
|
||
config.drivers = DriverConfig( | ||
prompt=OpenAiChatPromptDriver(model="gpt-4o"), | ||
embedding=VoyageAiEmbeddingDriver(), | ||
) | ||
|
||
agent = Agent( | ||
tools=[WebScraper(off_prompt=True), TaskMemoryClient(off_prompt=False)], | ||
config=StructureConfig( | ||
prompt_driver=OpenAiChatPromptDriver(model="gpt-4o"), | ||
embedding_driver=VoyageAiEmbeddingDriver(), | ||
), | ||
) | ||
|
||
agent.run("based on https://www.griptape.ai/, tell me what Griptape is") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's special about
Agent.prompt_driver
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the PR description:
Let me know if this is not a sufficient explanation, happy to go into more detail.