Adds get_datetime command.

This commit is contained in:
Torantulino
2023-03-28 23:05:44 +01:00
parent 217991eaf2
commit 375699e144

View File

@@ -1,16 +1,18 @@
import os
import datetime
import openai
import json
from googlesearch import search
import requests
from bs4 import BeautifulSoup
import re
import keys
from readability import Document
# Initialize the OpenAI API client
openai.api_key = keys.OPENAI_API_KEY
def get_datetime():
return "Current date and time: " + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
def scrape_text(url):
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")