Skip to content

Commit

Permalink
Fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvolter committed Dec 11, 2024
1 parent d10bc9c commit 5b07b70
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 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
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 5b07b70

Please sign in to comment.