From f65ec24da4b4dec4d8e928f50029c4e976d45740 Mon Sep 17 00:00:00 2001 From: AjaySi Date: Wed, 6 Mar 2024 18:42:24 +0530 Subject: [PATCH] WIP- Try AI-Writer and Web research; working. Working on usuability aspects. --- alwrity.py | 3 --- lib/gpt_providers/openai_chat_completion.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/alwrity.py b/alwrity.py index 87036c57..5753afc5 100644 --- a/alwrity.py +++ b/alwrity.py @@ -9,7 +9,6 @@ from prompt_toolkit.shortcuts import radiolist_dialog from dotenv import load_dotenv import requests from rich import print -from rich.console import Console from rich.text import Text load_dotenv(Path('.env')) @@ -95,8 +94,6 @@ def check_search_apis(): Check if necessary environment variables are 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 print("\n\nšŸ™‹ā™‚ļø šŸ™‹ā™‚ļø Before doing web research, ensure the following API keys are available:") diff --git a/lib/gpt_providers/openai_chat_completion.py b/lib/gpt_providers/openai_chat_completion.py index 5e768e82..a1134036 100644 --- a/lib/gpt_providers/openai_chat_completion.py +++ b/lib/gpt_providers/openai_chat_completion.py @@ -15,7 +15,7 @@ from tenacity import ( @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.