Skip to content

Commit

Permalink
Add missing kw_only
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed May 17, 2024
1 parent c1e5147 commit fc427c7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
10 changes: 8 additions & 2 deletions griptape/config/anthropic_structure_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@
@define
class AnthropicStructureConfig(StructureConfig):
prompt_driver: AnthropicPromptDriver = field(
default=Factory(lambda: AnthropicPromptDriver(model="claude-3-opus-20240229")), metadata={"serializable": True}
default=Factory(lambda: AnthropicPromptDriver(model="claude-3-opus-20240229")),
metadata={"serializable": True},
kw_only=True,
)
embedding_driver: VoyageAiEmbeddingDriver = field(
default=Factory(lambda: VoyageAiEmbeddingDriver(model="voyage-large-2")), metadata={"serializable": True}
default=Factory(lambda: VoyageAiEmbeddingDriver(model="voyage-large-2")),
metadata={"serializable": True},
kw_only=True,
)
vector_store_driver: LocalVectorStoreDriver = field(
default=Factory(
lambda: LocalVectorStoreDriver(embedding_driver=VoyageAiEmbeddingDriver(model="voyage-large-2"))
),
kw_only=True,
metadata={"serializable": True},
)
image_query_driver: AnthropicImageQueryDriver = field(
default=Factory(lambda: AnthropicImageQueryDriver(model="claude-3-opus-20240229")),
kw_only=True,
metadata={"serializable": True},
)
7 changes: 5 additions & 2 deletions griptape/config/google_structure_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
@define
class GoogleStructureConfig(StructureConfig):
prompt_driver: GooglePromptDriver = field(
default=Factory(lambda: GooglePromptDriver(model="gemini-pro")), metadata={"serializable": True}
default=Factory(lambda: GooglePromptDriver(model="gemini-pro")), kw_only=True, metadata={"serializable": True}
)
embedding_driver: GoogleEmbeddingDriver = field(
default=Factory(lambda: GoogleEmbeddingDriver(model="models/embedding-001")), metadata={"serializable": True}
default=Factory(lambda: GoogleEmbeddingDriver(model="models/embedding-001")),
kw_only=True,
metadata={"serializable": True},
)
vector_store_driver: LocalVectorStoreDriver = field(
default=Factory(
lambda: LocalVectorStoreDriver(embedding_driver=GoogleEmbeddingDriver(model="models/embedding-001"))
),
kw_only=True,
metadata={"serializable": True},
)
9 changes: 7 additions & 2 deletions griptape/config/openai_structure_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,27 @@
@define
class OpenAiStructureConfig(StructureConfig):
prompt_driver: OpenAiChatPromptDriver = field(
default=Factory(lambda: OpenAiChatPromptDriver(model="gpt-4o")), metadata={"serializable": True}
default=Factory(lambda: OpenAiChatPromptDriver(model="gpt-4o")), metadata={"serializable": True}, kw_only=True
)
image_generation_driver: OpenAiImageGenerationDriver = field(
default=Factory(lambda: OpenAiImageGenerationDriver(model="dall-e-2", image_size="512x512")),
kw_only=True,
metadata={"serializable": True},
)
image_query_driver: OpenAiVisionImageQueryDriver = field(
default=Factory(lambda: OpenAiVisionImageQueryDriver(model="gpt-4-vision-preview")),
kw_only=True,
metadata={"serializable": True},
)
embedding_driver: OpenAiEmbeddingDriver = field(
default=Factory(lambda: OpenAiEmbeddingDriver(model="text-embedding-3-small")), metadata={"serializable": True}
default=Factory(lambda: OpenAiEmbeddingDriver(model="text-embedding-3-small")),
metadata={"serializable": True},
kw_only=True,
)
vector_store_driver: LocalVectorStoreDriver = field(
default=Factory(
lambda: LocalVectorStoreDriver(embedding_driver=OpenAiEmbeddingDriver(model="text-embedding-3-small"))
),
kw_only=True,
metadata={"serializable": True},
)

0 comments on commit fc427c7

Please sign in to comment.