Skip to content

Forum in maintenance, we will back soon 🙂

prompt engineering ...
 
Notifications
Clear all

prompt engineering course

10 Posts
3 Users
6 Reactions
41 Views
(@paddy)
Posts: 50
Trusted Member
Topic starter
 

Hi Hasan just wondering whether there are updates to the 'connecting Python with OpenAI API' section? given that since this course was created we now have openai Assistants etc. Are there more updated ways of applying python to the assistant API's?

thank you!

 
Posted : 07/29/2024 10:17 am
Hasan Aboul Hasan
(@admin)
Posts: 1207
Member Admin
 

Hi Patrick, I am working on new updates.

the course covered the main way of connecting Python with OpenAI. You can check this video I created on assistance APIs:

https://youtu.be/-CJbJNQx2QE

if you have a specific scenario you want help with, let me know. I may create a video about it and add in the Premium Videos Library.

 
Posted : 07/29/2024 3:33 pm
(@paddy)
Posts: 50
Trusted Member
Topic starter
 

@admin great thanks Hasan

 
Posted : 07/29/2024 10:06 pm
(@paddy)
Posts: 50
Trusted Member
Topic starter
 

Hi Hasan

I keep getting the below error  code in the terminal when trying to run a tokeniser script, can you please explain what this means? chatgpt not helping. thanks

KeyError: 'Could not automatically map gpt-4o-mini to a tokeniser. Please use `tiktoken.get_encoding` to explicitly get the tokeniser you expect.'

 
Posted : 07/31/2024 3:26 am
Hasan Aboul Hasan
(@admin)
Posts: 1207
Member Admin
 

please share a screenshot and which function is this exactly

 
Posted : 07/31/2024 9:36 am
(@paddy)
Posts: 50
Trusted Member
Topic starter
 
image
image

Im also finding a lot of the modules imported at the top of your helpers file are causing issues as the right dependencies are not installed, so im getting a few error messages. are you able to send a list of all of the updated packages we need to install to run the modules below? as not mentioned in the course contents.

import tiktoken
import openai
import newspaper
from langchain.text_splitter import TokenTextSplitter
import re
from youtube_transcript_api import YouTubeTranscriptApi
import requests

thanks

Patrick

 
Posted : 07/31/2024 12:57 pm
(@paddy)
Posts: 50
Trusted Member
Topic starter
 

OK ive managed to get the youtube text extactor to work, but it is not summarising according to the youtube summary prompt, its giving me the full script.

The tokeniser issue is still happening though.

 
Posted : 07/31/2024 10:32 pm
(@husein)
Posts: 464
Member Moderator
 

@paddy Can you send a screenshot of the code, you may be printing the script instead of the OPenAI response.

 
Posted : 08/01/2024 12:18 pm
Patrick reacted
Hasan Aboul Hasan
(@admin)
Posts: 1207
Member Admin
 

@paddy, if it is giving the full script, it means you are printing the script and not the summary; please double check your code. and share it so we can help if still doesn't work 🙂

 
Posted : 08/01/2024 2:45 pm
Patrick reacted
(@paddy)
Posts: 50
Trusted Member
Topic starter
 

ahh yes I didn't realise the script I copied from your github repo was set up to print transcript rather than response. problem solved thank you!

 
Posted : 08/01/2024 10:46 pm
Share: