Skip to content

Commit

Permalink
saved state in dashboard error
Browse files Browse the repository at this point in the history
Former-commit-id: 97aa8bc
  • Loading branch information
Kye committed Nov 6, 2023
1 parent 690433d commit 0f81159
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion playground/models/openai_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from swarms.models.openai_models import OpenAIChat

openai = OpenAIChat(openai_api_key="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", verbose=False)
openai = OpenAIChat(openai_api_key="", verbose=False)

chat = openai("What are quantum fields?")
print(chat)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "swarms"
version = "1.9.6"
version = "1.9.9"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]
Expand Down
8 changes: 4 additions & 4 deletions swarms/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from swarms.models.vilt import Vilt
from swarms.models.nougat import Nougat
from swarms.models.layoutlm_document_qa import LayoutLMDocumentQA
from swarms.models.gpt4v import GPT4Vision
from swarms.models.dalle3 import Dalle3
# from swarms.models.gpt4v import GPT4Vision
# from swarms.models.dalle3 import Dalle3

# from swarms.models.distilled_whisperx import DistilWhisperModel

Expand Down Expand Up @@ -45,6 +45,6 @@
"HuggingfaceLLM",
"MPT7B",
"WizardLLMStoryTeller",
"GPT4Vision",
"Dalle3",
# "GPT4Vision",
# "Dalle3",
]
3 changes: 2 additions & 1 deletion swarms/models/dalle3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

load_dotenv()

api_key = os.getenv("OPENAI_API_KEY")
# api_key = os.getenv("OPENAI_API_KEY")

# Configure Logging
logging.basicConfig(level=logging.INFO)
Expand Down Expand Up @@ -49,6 +49,7 @@ class Dalle3:
size: str = "1024x1024"
max_retries: int = 3
quality: str = "standard"
api_key: str = None
n: int = 4
client = OpenAI(
api_key=api_key,
Expand Down
2 changes: 1 addition & 1 deletion swarms/models/gpt4v.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class GPT4Vision:
model: str = "gpt-4-vision-preview"
backoff_factor: float = 2.0
timeout_seconds: int = 10
api_key: Optional[str] = None or os.getenv("OPENAI_API_KEY")
api_key: Optional[str] = None
# 'Low' or 'High' for respesctively fast or high quality, but high more token usage
quality: str = "low"
# Max tokens to use for the API request, the maximum might be 3,000 but we don't know
Expand Down
2 changes: 1 addition & 1 deletion swarms/structs/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def print_dashboard(self, task: str):
Dashboard: {self.dashboard}
Dynamic Temperature: {self.dynamic_temperature}
Autosave: {self.autosave}
Saved State: {self.saved_state}
Saved State: {self.saved_state_path}
----------------------------------------
""",
Expand Down

0 comments on commit 0f81159

Please sign in to comment.