My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Reo Ogusu

5 likes

·

6.5K reads

9 comments

Ranjan Dailata
Ranjan Dailata
Jun 13, 2023

Great post. One small suggestion on returning the JSON response using pyyaml.

1
·
·1 reply
Reo Ogusu
Reo Ogusu
Author
·Jun 13, 2023

Thanks! Yeah I could try that.

·
Yuvayogi
Yuvayogi
Dec 14, 2023

I want full code for this!

1
·
Ranjan Dailata
Ranjan Dailata
Jun 14, 2023

The YAML template which you have specified in the "template" can be simplified by converting the multi-line to single say by using online convertors. It makes a lot of difference as each space and line adds up to the token count. You don't want to exceed the token count nor spend money unnecessarily.

·
Ranjan Dailata
Ranjan Dailata
Jun 14, 2023

Please try to flatten the resume input. A multi-line to single-line conversion will save a ton of tokens and cost involved with the Open AI GPT based models.

·
Ranjan Dailata
Ranjan Dailata
Jun 14, 2023

Sorry, I am not sure the exact reason why you decided to go with the conversation memory-based approach. However, the good news is that it's not required for this use case. The reason for optimization is to save cost by reducing the token size. Also improve the overall performance by asking for what is required.

·
Ranjan Dailata
Ranjan Dailata
Jun 14, 2023

OpenAIChat is deprecated. We need to go with the ChatOpenAI.

chatopenai = ChatOpenAI( model_name="gpt-3.5-turbo") llmchain_chat = LLMChain(llm=chatopenai, prompt=prompt)

·
Kiran Sitaram
Kiran Sitaram
Oct 12, 2023

Excellent article - illustrated in a very simple manner and very practical as well. I liked it.

·
Kiran Sitaram
Kiran Sitaram
Dec 29, 2023

The code provided is not complete. For example you are extracting the text from the pdf but you have included the call to the function in your code. Just for completeness of the article and for first time learners, I would suggest sharing the whole code or providing a link to the whole structures code.

·
sai kiran ganeshna
sai kiran ganeshna
Jan 9, 2024

Full code is not available please provide full code

·