WIP- Try AI-Writer and Web research; working. Working on usuability aspects.

This commit is contained in:
AjaySi
2024-03-06 18:42:24 +05:30
parent d75cf304d8
commit f65ec24da4
2 changed files with 1 additions and 4 deletions

View File

@@ -9,7 +9,6 @@ from prompt_toolkit.shortcuts import radiolist_dialog
from dotenv import load_dotenv from dotenv import load_dotenv
import requests import requests
from rich import print from rich import print
from rich.console import Console
from rich.text import Text from rich.text import Text
load_dotenv(Path('.env')) load_dotenv(Path('.env'))
@@ -95,8 +94,6 @@ def check_search_apis():
Check if necessary environment variables are present. Check if necessary environment variables are present.
Display messages with links on how to get them if not present. Display messages with links on how to get them if not present.
""" """
# Create a Rich console
console = Console()
# Use rich.print for styling and hyperlinking # Use rich.print for styling and hyperlinking
print("\n\n🙋♂️ 🙋♂️ Before doing web research, ensure the following API keys are available:") print("\n\n🙋♂️ 🙋♂️ Before doing web research, ensure the following API keys are available:")

View File

@@ -15,7 +15,7 @@ from tenacity import (
@retry(wait=wait_random_exponential(min=1, max=60), stop=stop_after_attempt(6)) @retry(wait=wait_random_exponential(min=1, max=60), stop=stop_after_attempt(6))
def openai_chatgpt(prompt, model="gpt-4-1106-preview", temperature=0.2, max_tokens=4096, top_p=0.9, n=1): def openai_chatgpt(prompt, model="gpt-3.5-turbo-0125", temperature=0.2, max_tokens=4096, top_p=0.9, n=1):
""" """
Wrapper function for OpenAI's ChatGPT completion. Wrapper function for OpenAI's ChatGPT completion.