Spaces:
Running
Running
File size: 482 Bytes
b263642 271c54a b263642 271c54a d243a03 271c54a b263642 271c54a |
1 2 3 4 5 6 7 8 9 10 11 12 |
import SpaceFace as sf
import GPTSimple as ai
class AIEndpoint:
def receivedMessage(self, message, user: sf.User, responder: sf.Responder):
if hasattr(user, 'chat'):
responder.respond(user.chat.ask(message))
else:
user.chat = ai.conversation(base_url="deepinfra", model="meta-llama/Llama-3.2-90B-Vision-Instruct")
responder.respond(user.chat.ask(message))
responder.close()
sf.start_server([AIEndpoint()]) |