Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] 스왑메모리 설정 #220

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ebextensions/01_steup_swap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commands:
01setup_swap:
test: test ! -e /var/swapfile
command: |
/bin/dd if=/dev/zero of=/var/swapfile bs=128M count=16
/bin/chmod 600 /var/swapfile
/sbin/mkswap /var/swapfile
/sbin/swapon /var/swapfile
2 changes: 1 addition & 1 deletion src/services/chatGPT.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const chatGPTCall = async (scriptText) => {
// ChatGPT에 전달할 프롬프트를 구성합니다.
const system_prompt =
`Step 1. Look at the example Json given with the original script and give it to me in json. "subheading" is to break up the paragraphs of the given script according to the subtopics. The name of subheading is the title of the subtopic, and subheading.content should keep the original script divided according to the subtopic. subheading.name and subheading.content should be different. Add the contents in subheading together and we need to divide them so that the original script comes out. This subheading should be able to be at least 1 to highest 10 and contain all of the divided scripts. "tag" is the keyword for the overall scripts. Please indicate at least 2 to 5. The result should be in Korean. You need to have the above conditions and give them to the Json example below
{"subheading": [{"name": "Subtitle 1","start_time": "script1 start time,""end_time": "script 1 end time","content": "script 1"},{"name": "Subtitle 2","start_time": "script2 start time","end_time": "script 2 end time","content": "script 2"}],"tag": [{"name": "Tag 1"},{"name": "Tag 2"},{"name": "Tag 3"}]}
{"subheading": [{"name": "Subtitle 1","content": "script 1"},{"name": "Subtitle 2","content": "script 2"}],"tag": [{"name": "Tag 1"},{"name": "Tag 2"},{"name": "Tag 3"}]}
`;

const prompt = `Run this script from step 1 , Make sure to fulfill the condition given to the system promport. original script: ${scriptText}\n ` ;
Expand Down
1 change: 0 additions & 1 deletion src/services/translateToMP3.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const desktopPath = path.join(__dirname, '..', '..');
// tempMP3 폴더 경로
const outputPath = '/tmp';


export const convertVideoToAudio = async (videoId) => {
return new Promise((resolve, reject) => {
const stream = ytdl(`http://www.youtube.com/watch?v=${videoId}`, { filter: 'audioonly' });
Expand Down
Loading