-
-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kye
committed
Apr 28, 2024
1 parent
842068c
commit 53fc90d
Showing
15 changed files
with
20 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,10 @@ | ||
from typing import List | ||
|
||
from pydantic import BaseModel | ||
from swarms.structs.step import Step | ||
|
||
|
||
class Plan: | ||
def __init__(self, steps: List[Step]): | ||
""" | ||
Initializes a Plan object. | ||
Args: | ||
steps (List[Step]): A list of Step objects representing the steps in the plan. | ||
""" | ||
self.steps = steps | ||
|
||
def __str__(self) -> str: | ||
""" | ||
Returns a string representation of the Plan object. | ||
Returns: | ||
str: A string representation of the Plan object. | ||
""" | ||
return str([str(step) for step in self.steps]) | ||
|
||
def __repr(self) -> str: | ||
""" | ||
Returns a string representation of the Plan object. | ||
class Plan(BaseModel): | ||
steps: List[Step] | ||
|
||
Returns: | ||
str: A string representation of the Plan object. | ||
""" | ||
return str(self) | ||
class Config: | ||
orm_mode = True |
Oops, something went wrong.