Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvolter committed Dec 11, 2024
1 parent 6a60da1 commit 09dd849
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cookbook/assistants/llms/vertexai/samples/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def multimodal_example(project: Optional[str], location: Optional[str]) -> str:
# Load the model
multimodal_model = GenerativeModel("gemini-1.0-pro-vision")
# Query the model
response = multimodal_model.generate_media(
response = multimodal_model.generate_content(
[
# Add an example image
Part.from_uri("gs://generativeai-downloads/images/scones.jpg", mime_type="image/jpeg"),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/assistants/llms/vertexai/samples/text_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def generate(project: Optional[str], location: Optional[str]) -> None:
# Load the model
model = GenerativeModel("gemini-1.0-pro-vision")
# Query the model
responses: Iterable[GenerationResponse] = model.generate_media("Who are you?", stream=True)
responses: Iterable[GenerationResponse] = model.generate_content("Who are you?", stream=True)
# Process the response
for response in responses:
print(response.text, end="")
Expand Down
4 changes: 2 additions & 2 deletions phi/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,9 @@ def get_agent_data(self) -> Dict[str, Any]:
if self.model is not None:
agent_data["model"] = self.model.to_dict()
if self.images is not None:
agent_data["images"] = [img.model_dump() for img in self.images]
agent_data["images"] = [img if isinstance(img, dict) else img.model_dump() for img in self.images]
if self.videos is not None:
agent_data["videos"] = [vid.model_dump() for vid in self.videos]
agent_data["videos"] = [vid if isinstance(vid, dict) else vid.model_dump() for vid in self.videos]
return agent_data

def get_session_data(self) -> Dict[str, Any]:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ exclude = ["phienv*", "aienv*"]
check_untyped_defs = true
no_implicit_optional = true
warn_unused_configs = true
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
exclude = ["phienv*", "aienv*", "scratch*", "wip*", "tmp*", "cookbook/assistants/examples/*", "phi/assistant/openai/*"]

Expand Down

0 comments on commit 09dd849

Please sign in to comment.