mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-10-11 01:52:30 +02:00
fixes
This commit is contained in:
@@ -51,9 +51,9 @@ class Bot:
|
||||
|
||||
self.job_list = []
|
||||
|
||||
print("Nostr BOT public key: " + str(pk.to_bech32()) + " Hex: " + str(pk.to_hex()) + " Name: " + self.NAME +
|
||||
" Supported DVM tasks: " +
|
||||
', '.join(p.NAME + ":" + p.TASK for p in self.dvm_config.SUPPORTED_DVMS) + "\n")
|
||||
print("Nostr BOT public key: " + str(pk.to_bech32()) + " Hex: " + str(pk.to_hex()) + " Name: " + self.NAME) # +
|
||||
#" Supported DVM tasks: " +
|
||||
#', '.join(p.NAME + ":" + p.TASK for p in self.dvm_config.SUPPORTED_DVMS) + "\n")
|
||||
|
||||
for relay in self.dvm_config.RELAY_LIST:
|
||||
await self.client.add_relay(relay)
|
||||
@@ -69,7 +69,7 @@ class Bot:
|
||||
kinds.append(Kind(dvm.KIND.as_u64() + 1000))
|
||||
dvm_filter = (Filter().kinds(kinds).since(Timestamp.now()))
|
||||
|
||||
self.client.subscribe([zap_filter, dm_filter, nip59_filter, dvm_filter], None)
|
||||
await self.client.subscribe([zap_filter, dm_filter, nip59_filter, dvm_filter], None)
|
||||
|
||||
create_sql_table(self.dvm_config.DB)
|
||||
await admin_make_database_updates(adminconfig=self.admin_config, dvmconfig=self.dvm_config, client=self.client)
|
||||
|
@@ -163,12 +163,12 @@ class DVMTaskInterface:
|
||||
# f.close()
|
||||
|
||||
|
||||
def process_venv(identifier):
|
||||
async def process_venv(identifier):
|
||||
args = DVMTaskInterface.process_args()
|
||||
dvm_config = build_default_config(args.identifier)
|
||||
dvm = identifier(name="", dvm_config=dvm_config, nip89config=NIP89Config(), admin_config=None)
|
||||
try:
|
||||
result = dvm.process(json.loads(args.request))
|
||||
result = asyncio.run(dvm.process(json.loads(args.request)))
|
||||
DVMTaskInterface.write_output(result, args.output)
|
||||
except Exception as e:
|
||||
DVMTaskInterface.write_output("Error: " + str(e), args.output)
|
||||
|
@@ -24,12 +24,10 @@ Outputs: An url to an Image
|
||||
|
||||
|
||||
class ImageGenerationDALLE(DVMTaskInterface):
|
||||
KIND: EventDefinitions.KIND_NIP90_GENERATE_IMAGE
|
||||
KIND = EventDefinitions.KIND_NIP90_GENERATE_IMAGE
|
||||
TASK: str = "text-to-image"
|
||||
FIX_COST: float = 120
|
||||
dependencies = [("nostr-dvm", "nostr-dvm"),
|
||||
("requests", "requests"),
|
||||
("pillow", "pillow"),
|
||||
("openai", "openai==1.3.5")]
|
||||
|
||||
async def init_dvm(self, name, dvm_config: DVMConfig, nip89config: NIP89Config, nip88config: NIP88Config = None,
|
||||
|
2
setup.py
2
setup.py
@@ -1,6 +1,6 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
VERSION = '0.6.9'
|
||||
VERSION = '0.6.10'
|
||||
DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines'
|
||||
LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')
|
||||
|
||||
|
Reference in New Issue
Block a user