From 0282d4fca5e458313adad40da8f25720581ecc71 Mon Sep 17 00:00:00 2001 From: Gokul Mohanarangan Date: Fri, 14 Jul 2023 23:04:44 +0530 Subject: [PATCH 1/3] remove key --- trials/finetune.py | 0 trials/openai_endpoint.py | 12 +++++++++--- trials/youtube_scraping.py | 0 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 trials/finetune.py create mode 100644 trials/youtube_scraping.py diff --git a/trials/finetune.py b/trials/finetune.py new file mode 100644 index 00000000..e69de29b diff --git a/trials/openai_endpoint.py b/trials/openai_endpoint.py index 6fb0f56a..30e6a900 100644 --- a/trials/openai_endpoint.py +++ b/trials/openai_endpoint.py @@ -3,7 +3,7 @@ import openai -openai.api_key = "***REMOVED***" +openai.api_key = "" # to caption, user prompt used : "caption this conversation" # max_tokens=20 @@ -21,10 +21,16 @@ conversation = [ "content": "summarize this conversation in a few sentences by taking key points"} ] -response = openai.ChatCompletion.create(model="gpt-3.5-turbo", +model = "gpt-3.5-turbo" +response = openai.ChatCompletion.create(model=model, messages=conversation, n=1, max_tokens=300) -caption = response.choices[0].message.content.strip() +# Try finetuned model +# model = "davinci:ft-personal-2023-07-14-10-43-51" +# response = openai.Completion.create(model=model, +# prompt=sample_chunks[0] + " -> ") + +caption = response.choices[0] print(caption) diff --git a/trials/youtube_scraping.py b/trials/youtube_scraping.py new file mode 100644 index 00000000..e69de29b From 1a18b5ce58b11539b4e636e775712a269c993d26 Mon Sep 17 00:00:00 2001 From: projects-g <63178974+projects-g@users.noreply.github.com> Date: Fri, 14 Jul 2023 23:05:48 +0530 Subject: [PATCH 2/3] Delete youtube_scraping.py --- trials/youtube_scraping.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 trials/youtube_scraping.py diff --git a/trials/youtube_scraping.py b/trials/youtube_scraping.py deleted file mode 100644 index e69de29b..00000000 From 03da9f61ca91e78edb2b782546123a80c03c4bb0 Mon Sep 17 00:00:00 2001 From: projects-g <63178974+projects-g@users.noreply.github.com> Date: Fri, 14 Jul 2023 23:05:59 +0530 Subject: [PATCH 3/3] Delete finetune.py --- trials/finetune.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 trials/finetune.py diff --git a/trials/finetune.py b/trials/finetune.py deleted file mode 100644 index e69de29b..00000000