refactor: update input handling and OpenAI endpoint

- Updated input statements in main.py for improved user interaction.
- Revised the OpenAI endpoint in open_ai_stuff.py to migrate to the latest OpenAI library version for enhanced functionality and compatibility.
This commit is contained in:
Rajtilak Bhattacharjee 2023-11-11 11:07:51 +05:30
parent 00ef28f5c5
commit 19538ec67b
2 changed files with 3 additions and 3 deletions

View File

@ -16,8 +16,8 @@ def main():
unique_id = uuid.uuid4()
# (CONTENT) Generate scripts for top 3 comments from FIRST pinned post
name = input("Please enter the name of the Podcast")
desc = input("Please enter the description of the Podcast")
name = input("Please enter the name of the Podcast: ")
desc = input("Please enter the description of the Podcast: ")
openai.organization = input("Please enter your OpenAI Org: ")
openai.api_key = input("Please enter your OpenAI API key: ")
eleven_labs_api_key = input("Please enter your ElevenLabs API key: ")

View File

@ -4,7 +4,7 @@ import openai
def generate_response(system_prompt, user_prompt):
response = openai.ChatCompletion.create(
response = openai.chat.completions.create(
model="gpt-4",
messages=[
{