pull/197/head
Kye 1 year ago
parent 66d9f7086b
commit b9fea7b9c8

@ -1,28 +0,0 @@
import os
from dotenv import load_dotenv
from swarms.models.revgptV4 import RevChatGPTModel
from swarms.workers.worker import Worker
load_dotenv()
config = {
"model": os.getenv("REVGPT_MODEL"),
"plugin_ids": [os.getenv("REVGPT_PLUGIN_IDS")],
"disable_history": os.getenv("REVGPT_DISABLE_HISTORY") == "True",
"PUID": os.getenv("REVGPT_PUID"),
"unverified_plugin_domains": [
os.getenv("REVGPT_UNVERIFIED_PLUGIN_DOMAINS")
],
}
llm = RevChatGPTModel(access_token=os.getenv("ACCESS_TOKEN"), **config)
worker = Worker(ai_name="Optimus Prime", llm=llm)
task = (
"What were the winning boston marathon times for the past 5 years (ending"
" in 2022)? Generate a table of the year, name, country of origin, and"
" times."
)
response = worker.run(task)
print(response)

@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "swarms"
version = "2.4.0"
version = "2.4.1"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]

@ -25,7 +25,7 @@ from swarms.models.idefics import Idefics # noqa: E402
from swarms.models.vilt import Vilt # noqa: E402
from swarms.models.nougat import Nougat # noqa: E402
from swarms.models.layoutlm_document_qa import LayoutLMDocumentQA # noqa: E402
from swarms.models.gpt4_vision_api import GPT4VisionAPI # noqa: E40
from swarms.models.gpt4_vision_api import GPT4VisionAPI # noqa: E402
# from swarms.models.gpt4v import GPT4Vision
# from swarms.models.dalle3 import Dalle3

@ -2,6 +2,7 @@ import base64
import os
import requests
from dotenv import load_dotenv
import concurrent.futures
# Load environment variables
load_dotenv()
@ -135,4 +136,5 @@ class GPT4VisionAPI:
except Exception as error:
print(f"Error with the request: {error}")
raise error
# Function to handle vision tasks
# Function to handle vision tasks

Loading…
Cancel
Save