Skip to content

Commit

Permalink
Add VertexAI prefix to GeminiGenerator and GeminiChatGenerator compon…
Browse files Browse the repository at this point in the history
…ents (#166)
  • Loading branch information
silvanocerza authored Jan 3, 2024
1 parent 065042e commit b252d72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


@component
class GeminiChatGenerator:
class VertexAIGeminiChatGenerator:
def __init__(
self,
*,
Expand Down Expand Up @@ -100,7 +100,7 @@ def to_dict(self) -> Dict[str, Any]:
return data

@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "GeminiChatGenerator":
def from_dict(cls, data: Dict[str, Any]) -> "VertexAIGeminiChatGenerator":
if (tools := data["init_parameters"].get("tools")) is not None:
data["init_parameters"]["tools"] = [Tool.from_dict(t) for t in tools]
if (generation_config := data["init_parameters"].get("generation_config")) is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


@component
class GeminiGenerator:
class VertexAIGeminiGenerator:
def __init__(
self,
*,
Expand Down Expand Up @@ -111,7 +111,7 @@ def to_dict(self) -> Dict[str, Any]:
return data

@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "GeminiGenerator":
def from_dict(cls, data: Dict[str, Any]) -> "VertexAIGeminiGenerator":
if (tools := data["init_parameters"].get("tools")) is not None:
data["init_parameters"]["tools"] = [Tool.from_dict(t) for t in tools]
if (generation_config := data["init_parameters"].get("generation_config")) is not None:
Expand Down

0 comments on commit b252d72

Please sign in to comment.