Merge pull request #3 from believethehype/privatezaps

Private zaps
This commit is contained in:
believethehype
2023-11-26 21:47:57 +01:00
committed by GitHub
17 changed files with 516 additions and 288 deletions

View File

@@ -46,7 +46,7 @@ class ImageGenerationDALLE(DVMTaskInterface):
model = "dall-e-3"
quality = "standard"
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
input_type = tag.as_vec()[2]
if input_type == "text":

View File

@@ -55,7 +55,7 @@ class ImageGenerationSDXL(DVMTaskInterface):
lora_weight = ""
strength = ""
guidance_scale = ""
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
input_type = tag.as_vec()[2]
if input_type == "text":

View File

@@ -43,7 +43,7 @@ class TextExtractionPDF(DVMTaskInterface):
input_content = ""
url = ""
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
input_type = tag.as_vec()[2]
input_content = tag.as_vec()[1]

View File

@@ -42,7 +42,7 @@ class Translation(DVMTaskInterface):
text = ""
translation_lang = "en"
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
input_type = tag.as_vec()[2]
@@ -52,20 +52,20 @@ class Translation(DVMTaskInterface):
translation_lang = str(tag.as_vec()[2]).split('-')[0]
if input_type == "event":
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
evt = get_event_by_id(tag.as_vec()[1], client=client, config=dvm_config)
text = evt.content()
break
elif input_type == "text":
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
text = tag.as_vec()[1]
break
elif input_type == "job":
for tag in event.tags():
for tag in event.tags:
if tag.as_vec()[0] == 'i':
evt = get_referenced_event_by_id(event_id=tag.as_vec()[1], client=client,
kinds=[EventDefinitions.KIND_NIP90_RESULT_EXTRACT_TEXT,