added huggingchat examples

This commit is contained in:
Believethehype
2024-01-03 21:09:54 +01:00
parent b65b62d6b9
commit 7dc5bc8821
2 changed files with 14 additions and 4 deletions

View File

@@ -58,6 +58,10 @@ class TextSummarizationHuggingChat(DVMTaskInterface):
EventDefinitions.KIND_NIP90_RESULT_TRANSLATE_TEXT,
EventDefinitions.KIND_NIP90_RESULT_CONTENT_DISCOVERY],
dvm_config=dvm_config)
if evt is None:
print("Event not found")
raise Exception
if evt.kind() == EventDefinitions.KIND_NIP90_RESULT_CONTENT_DISCOVERY:
result_list = json.loads(evt.content())
prompt = ""