Merge branch 'main' into backends-nserver

This commit is contained in:
Believethehype 2023-12-15 10:28:04 +01:00
commit f0b1303280
12 changed files with 93 additions and 106 deletions

View File

@ -139,7 +139,13 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
# Add NIP89
nip90params = {
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I search notes",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": {
"user": {
"required": False,
"values": [],
@ -161,13 +167,6 @@ def build_example(name, identifier, admin_config):
"description": "The number of maximum results to return (default currently 20)"
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I search notes",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
}
nip89config = NIP89Config()

View File

@ -85,19 +85,18 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
# Add NIP89
nip90params = {
"media_format": {
"required": False,
"values": ["video/mp4", "audio/mp3"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I convert videos from urls to given output format.",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {
"media_format": {
"required": False,
"values": ["video/mp4", "audio/mp3"]
}
}
}
nip89config = NIP89Config()

View File

@ -172,7 +172,13 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
# Add NIP89
nip90params = {
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I discover users you follow, but that have been inactive on Nostr",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": {
"user": {
"required": False,
"values": [],
@ -182,16 +188,8 @@ def build_example(name, identifier, admin_config):
"required": False,
"values": [],
"description": "The number of days a user has not been active to be considered inactive"
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I discover users you follow, but that have been inactive on Nostr",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
}
nip89config = NIP89Config()

View File

@ -130,19 +130,18 @@ def build_example(name, identifier, admin_config):
cost_in_cent = 4.0
dvm_config.FIX_COST = int(((cost_in_cent / (get_price_per_sat("USD") * 100)) + profit_in_sats))
nip90params = {
"size": {
"required": False,
"values": ["1024:1024", "1024x1792", "1792x1024"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I use OpenAI's DALL·E 3",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {
"size": {
"required": False,
"values": ["1024:1024", "1024x1792", "1792x1024"]
}
}
}

View File

@ -125,19 +125,18 @@ def build_example(name, identifier, admin_config):
profit_in_sats = 10
dvm_config.FIX_COST = int(((4.0 / (get_price_per_sat("USD") * 100)) + profit_in_sats))
nip90params = {
"size": {
"required": False,
"values": ["1024:1024", "1024x1792", "1792x1024"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I use Replicate to run StableDiffusion XL",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {
"size": {
"required": False,
"values": ["1024:1024", "1024x1792", "1792x1024"]
}
}
}

View File

@ -136,19 +136,18 @@ def build_example(name, identifier, admin_config):
# A module might have options it can be initialized with, here we set a default model, and the nova-server
# address it should use. These parameters can be freely defined in the task component
nip90params = {
"language": {
"required": False,
"values": ["en-US"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I extract text from media files with the Google API. I understand English by default",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {
"language": {
"required": False,
"values": ["en-US"]
}
}
}
nip89config = NIP89Config()
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,

View File

@ -101,14 +101,13 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
# Add NIP89
nip90params = {}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I extract text from pdf documents. I only support Latin letters",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {}
}
nip89config = NIP89Config()

View File

@ -102,19 +102,18 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
nip90params = {
"size": {
"required": False,
"values": ["1024:1024", "1024x1792", "1792x1024"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I use a LLM connected via OLLAMA",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {
"size": {
"required": False,
"values": ["1024:1024", "1024x1792", "1792x1024"]
}
}
}
options = {'default_model': "ollama/llama2-uncensored", 'server': "http://localhost:11434"}

View File

@ -115,7 +115,14 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
nip90params = {
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I translate text from given text/event/job. Currently using Google TranslationGoogle Services to translate "
"input into the language defined in params.",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": {
"language": {
"required": False,
"values": ["en", "az", "be", "bg", "bn", "bs", "ca", "ceb", "co", "cs", "cy", "da", "de", "el", "eo", "es",
@ -127,14 +134,6 @@ def build_example(name, identifier, admin_config):
"vi", "xh", "yi", "yo", "zh", "zu"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I translate text from given text/event/job. Currently using Google TranslationGoogle Services to translate "
"input into the language defined in params.",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
}
nip89config = NIP89Config()
nip89config.DTAG = nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,

View File

@ -114,7 +114,15 @@ def build_example(name, identifier, admin_config):
options = {'libre_end_point': os.getenv("LIBRE_TRANSLATE_ENDPOINT"),
'libre_api_key': os.getenv("LIBRE_TRANSLATE_API_KEY")}
nip90params = {
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I translate text from given text/event/job using LibreTranslate Services to translate "
"input into the language defined in params.",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": {
"language": {
"required": False,
"values": ["en", "az", "be", "bg", "bn", "bs", "ca", "ceb", "co", "cs", "cy", "da", "de", "el", "eo", "es",
@ -126,14 +134,6 @@ def build_example(name, identifier, admin_config):
"vi", "xh", "yi", "yo", "zh", "zu"]
}
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I translate text from given text/event/job using LibreTranslate Services to translate "
"input into the language defined in params.",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
}
nip89config = NIP89Config()
nip89config.DTAG = nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,

View File

@ -105,15 +105,14 @@ def build_example(name, identifier, admin_config):
dvm_config = build_default_config(identifier)
admin_config.LUD16 = dvm_config.LN_ADDRESS
# Add NIP89
nip90params = {
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I show trending notes from nostr.band",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {}
}
nip89config = NIP89Config()

View File

@ -117,15 +117,13 @@ def build_example(name, identifier, admin_config):
cost_in_cent = 4.0
dvm_config.FIX_COST = int(((cost_in_cent / (get_price_per_sat("USD") * 100)) + profit_in_sats))
nip90params = {
}
nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I use Replicate to run StableDiffusion XL",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": nip90params
"nip90Params": {}
}