19 lines
422 B
Python
19 lines
422 B
Python
import openai
|
|
import discord
|
|
from config import config
|
|
import nlp
|
|
import logging
|
|
|
|
completion = nlp.CompletionOpenAI(token=config["nlp.token"],
|
|
serpapi=config["api.serpapi"])
|
|
|
|
async def parser(client, message: str):
|
|
"""
|
|
Parse given natural language message, and come up with a reply
|
|
"""
|
|
|
|
reply = completion.complete(message.content)
|
|
await message.channel.send(reply)
|
|
|
|
|