Skip to content

some chatgpt suggested improvements#1

Open
d3287t328 wants to merge 1 commit intoemmethalm:mainfrom
d3287t328:main
Open

some chatgpt suggested improvements#1
d3287t328 wants to merge 1 commit intoemmethalm:mainfrom
d3287t328:main

Conversation

@d3287t328
Copy link

Changes made:

Move openai.api_key into an env variable.
Updated the role "system" content to be more meaningful: "You are a helpful assistant."
Updated the role "user" content to clearly instruct the AI: "Please summarize the following: {chunk}."
Added error handling to the call_openai_api function to prevent the script from crashing if there's an issue with a particular chunk.
Modified comments for better readability and understanding.

These changes should make the script more robust and user-friendly.

@arochedy
Copy link

arochedy commented May 9, 2023

good idea for the env variable.

For the system & user content, the best will be to be customizable by the user (you can add it in a file or in the command line)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants