Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvolter committed Dec 11, 2024
1 parent 2fd27e1 commit d10bc9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 4 additions & 5 deletions cookbook/playground/multimodal_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from phi.playground import Playground, serve_playground_app
from phi.storage.agent.sqlite import SqlAgentStorage
from phi.tools.fal_tools import FalTools
from pydantic import BaseModel, Field

image_agent_storage_file: str = "tmp/image_agent.db"

Expand All @@ -26,7 +25,7 @@
description="You are an AI agent that can generate images using DALL-E.",
instructions=[
"When the user asks you to create an image, use the `create_image` tool to create the image.",
"Don't provide the URL of the image in the response. Only describe what image was generated."
"Don't provide the URL of the image in the response. Only describe what image was generated.",
],
markdown=True,
debug_mode=True,
Expand All @@ -43,7 +42,7 @@
description="You are an AI agent that can generate gifs using the ModelsLabs API.",
instructions=[
"When the user asks you to create an image, use the `generate_media` tool to create the image.",
"Don't provide the URL of the image in the response. Only describe what image was generated."
"Don't provide the URL of the image in the response. Only describe what image was generated.",
],
markdown=True,
debug_mode=True,
Expand All @@ -60,7 +59,7 @@
description="You are an AI agent that can generate videos using the ModelsLabs API.",
instructions=[
"When the user asks you to create a video, use the `generate_media` tool to create the video.",
"Don't provide the URL of the video in the response. Only describe what video was generated."
"Don't provide the URL of the video in the response. Only describe what video was generated.",
],
markdown=True,
debug_mode=True,
Expand All @@ -77,7 +76,7 @@
description="You are an AI agent that can generate videos using the Fal API.",
instructions=[
"When the user asks you to create a video, use the `generate_media` tool to create the video.",
"Don't provide the URL of the video in the response. Only describe what video was generated."
"Don't provide the URL of the video in the response. Only describe what video was generated.",
],
markdown=True,
debug_mode=True,
Expand Down
4 changes: 3 additions & 1 deletion phi/llm/openai/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def to_dict(self) -> Dict[str, Any]:
if self.presence_penalty:
_dict["presence_penalty"] = self.presence_penalty
if self.response_format:
_dict["response_format"] = self.response_format if isinstance(self.response_format, dict) else str(self.response_format)
_dict["response_format"] = (
self.response_format if isinstance(self.response_format, dict) else str(self.response_format)
)
if self.seed is not None:
_dict["seed"] = self.seed
if self.stop:
Expand Down
4 changes: 3 additions & 1 deletion phi/model/openai/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ def to_dict(self) -> Dict[str, Any]:
if self.presence_penalty is not None:
model_dict["presence_penalty"] = self.presence_penalty
if self.response_format is not None:
model_dict["response_format"] = self.response_format if isinstance(self.response_format, dict) else str(self.response_format)
model_dict["response_format"] = (
self.response_format if isinstance(self.response_format, dict) else str(self.response_format)
)
if self.seed is not None:
model_dict["seed"] = self.seed
if self.stop is not None:
Expand Down

0 comments on commit d10bc9c

Please sign in to comment.