#๐ Extentions.run_intenter() missing 1 required positional argument: 'self'
4 messages ยท Page 1 of 1 (latest)
@wide sand
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
When passing over the intent via a Txt to the CallConrtoler (we also tryed it via passing our needed arguments) we get the error Extentions.run_intenter() missing 1 required positional argument: 'self' Any Ideas why?
intent_raw1 = intents_raw.choices[0].message.content
print(intent_raw1)
intent = interpret_intent(intent_raw1)
print(intent)
with open('temp.txt', 'w') as datei:
datei.write(intent)
CallController.Extentions.run_intenter()
from neuralintents import GenericAssistant
from extentions.phillipshue import light_an
from extentions.phillipshue import light_aus
class Extentions:
def __init__(self):
self.assistant = GenericAssistant("intents.json", intent_methods={
"licht_an": self.licht_an,
"licht_aus": self.licht_aus
})
self.assistant.train_model()
def licht_an(self):
light_an()
def licht_aus(self):
light_aus()
def run_intenter(self):
with open('temp.txt', 'r') as datei:
inhalt = datei.read()
self.assistant.request(inhalt)
@wide sand
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.