#๐Ÿ”’ only 4 hours left...need a pro helper

205 messages ยท Page 1 of 1 (latest)

keen lagoonBOT
#

@autumn cliff

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

rare lagoon
#

unauthorized huh

#

thanks for the api key

autumn cliff
#

nooooooo

stable rune
#

Is your api key correct?

unique marlin
#

people definitely do

stable rune
#

Eh

rare lagoon
#

if u didnt change expire date its gonna expire in 30 days from psate website

#

fyi

#

doesnt seem like u did

#

anyways

stable rune
#

Check if your key is valid.

autumn cliff
#

yes it is

#

i checked it twice

olive bough
#

Did you try the playground or the curl command?

rare lagoon
#

do u really use /access_token= to give it api key to authorize ?

stable rune
#

Recheck it.

rare lagoon
#

DEEPGRAM_URL = f"wss://api.deepgram.com/v1/listen?access_token={DEEPGRAM_API_KEY}" if api key is correct then link must not be right ? pithink

autumn cliff
#

ohh

olive bough
autumn cliff
#

ok wait

olive bough
#

If it doesn't work with curl, it won't work with the code

stable rune
#

Not sure if this is helpful, but in the tutorials it uses

'https://api.deepgram.com/v1/listen'

https, not wss.

autumn cliff
#

do i have to paste it in terminal or python shell

rare lagoon
#

the other one looks like a server link tbh

stable rune
olive bough
#

Can you paste your code but just delete the actual API key from it (like add a placeholder text or something)?

keen lagoonBOT
pseudo hatch
#

pastebin pls

#

thank you

pseudo hatch
rare lagoon
unique marlin
rare lagoon
#

its op's original post but i replaced api key with empty string

#

i still got original pastebin link lol

autumn cliff
autumn cliff
rare lagoon
stable rune
#

Do that.

#

Delete it, and generate a new one.

rare lagoon
#

but ye getting a new one is smart

stable rune
#

And keep that private.

rare lagoon
#

read it from env var or something

#

how do discord bots do it again

unique marlin
#

env var

pseudo hatch
unique marlin
autumn cliff
#

is anyone helping to solve my query?

stable rune
autumn cliff
#

โŒ Error: https://api.deepgram.com/v1/listen isn't a valid URI: scheme isn't ws or wss

stable rune
#

Yeah use wss again then.

#

Maybe it's authorization and not access_token?

unique marlin
#

It's a header not a query string parameter

olive bough
#

So it should be like:

headers = {
    "Authorization": f"token {DEEPGRAM_API_KEY}"
}

websockets.connect(uri, additional_headers=headers)
``` or something
vital dune
#

@autumn cliff if you want my help you need to explain what you are trying to do

stable rune
vital dune
#

and deepgram is an api you need to call?

autumn cliff
#

yes sir

#

i tried to use vox too

#

but it didnt work

vital dune
#

live stream voice? or send pre recorded file?

autumn cliff
#

generally live stream voice

vital dune
#

is the assignment to do this with a live stream?

autumn cliff
#

no not with live stream but works like gemini voice or something but with writing only

#

i am stuck there for 4 hours

vital dune
#

it is a huge difference from pre recorded audio to live stream

stable rune
#

I think for simplicity maybe do pre-recorded audio?

vital dune
#

dependds on what the assignment is

stable rune
#

Yeah.

vital dune
#

tell me about the problem you are trying to solve

autumn cliff
vital dune
#

there are no way for you to complete this in two hours

#

but you should focus on what you can do

stable rune
#

What's his assignment tasks?

vital dune
#

many many things that each take mulltiple hours

stable rune
#

All scored the same?

autumn cliff
#

what can i do..in two and half hours?

stable rune
#

Send me the assignment in dm. I'll see if I can help in any of the parts. No promises.

vital dune
#

so you should not do voice as input, you should use text, since that is one of the options

stable rune
#

And next time, don't put an assignment that you don't know exactly how to do for the last minute.

vital dune
#

Accepts voice or text input

#

use text input

#

have you setup your automation tech stack?

autumn cliff
#

i was using chatgpt tbh

#

i thought i could do it with chatgpt

#

so i took this assignemnt

#

but stuck now

vital dune
#

did you learn something from trying to get an LLM to do your work?

vital dune
autumn cliff
#

what is automation tech stack?

#

i created the venv

vital dune
autumn cliff
#

pip installed all required libraries

autumn cliff
vital dune
autumn cliff
#

not youtube api and llm

vital dune
#

it will probably take a few hours just to setup n8n if your not familiar with it

autumn cliff
#

they said i could do it with python too

vital dune
#

i see.. have you already written the python code for the automation part?

autumn cliff
#

yes..for voice to text using deepgram

vital dune
#

it is still unclear what you need help with

autumn cliff
#

wait

#

let me send you the error it is making

vital dune
autumn cliff
#

yes

vital dune
#

then you should just delete everything and start over not using AI

autumn cliff
#

so what should i do

vital dune
#

use the docs

autumn cliff
#

but

vital dune
#

what you need is already in the documentation

autumn cliff
#

how am i gonna do it in rest hours

vital dune
#

you are not, this is not something you can complete in a few hours

#

here is the docs for deepgram about working with streaming audio

#

but as i said earlier, dont use streaming audio

autumn cliff
vital dune
#

use text

autumn cliff
#

text?

#

ok

vital dune
#

im not saying you should

#

im saying you should not

autumn cliff
#

what is LLM

stable rune
#

Aka what you call AI.

#

i.e., chatGPT, or more accurately the model chatGPT uses.

stable rune
autumn cliff
#

ok wait

stable rune
#

This thread also really went nowhere. Did you atleast get the 401 error fixed?

autumn cliff
#

eivl is not helping

#

noo

stable rune
#

No, eivl is helping.

vital dune
#

i dont know what you want help with

stable rune
#

eivl is helping the most in fact.

vital dune
#

you have not said anything about it

olive bough
#

I think everyone is helping quite a lot

vital dune
#

you have shared with me an assigment and some AI generated code. i still dont know what you want to do or what you need help with

stable rune
#

He explained:
1- Don't put your assignment that you're clueless about for last minute.
2- Don't use AI exclusively to do your homework for you.
3- Don't post homework here as I have said time and time again and expect others to just do it for you and complain when you're running out of time.

olive bough
#

We also provided help with your initial question

autumn cliff
olive bough
#

I think we identified that you weren't providing the API key in the right way, and we also showed how to do it

stable rune
#

The very fact he didn't just add this repeated homework solve request as a violation means he is trying to help.

vital dune
stable rune
vital dune
#

yes, XY problems are hard to help out with

stable rune
#

I am not the best at apis, but I'm pretty sure it's how he's passing his api token.

#

dementati and I posted two doc links which talk about how to pass the api token properly.

#

@autumn cliff Have you tried either of those?

autumn cliff
autumn cliff
#

the url

stable rune
#

No, that was https vs wss.

#

The other link.

stable rune
#

What is your assignment?

#

Best I can do for you is to help you come up with a minimal project outline to try and tackle in the remaining time you have.

#

Although given you just use chatGPT to write the code, I doubt that would be helpful either.

autumn cliff
#

ok wait

#

don't mind eivl..i am sending this to ace too

stable rune
#

Where did you send it?

autumn cliff
#

dm

#

see

stable rune
#
YouTube Video Finder with Analysis
Create an automation that:
Accepts voice or text input (Hindi/English).
Searches YouTube for relevant videos based on the query.
Filters the results to:
4-20 minutes in length.
Posted within the last 14 days.
Returns top 20 results.
Analyzes the video titles using Gemini 2.0 Flash or ChatGPT 4o Mini.
Outputs the best video based on title quality or relevance.
Tech Stack:
n8n / Make.com / Python
YouTube API
LLM for analysis
autumn cliff
#

how can i get the youtube api

vital dune
#

you sign up as a developer and make a dev account and app

#

here is the getting started page

stable rune
#

Step 1: Take query as text input.
Step 2: Search youtube for relevant videos (based on title) with respect to step 1.
Step 3: Iterate over the list of relevant videos, check their length, and if they are within 4 and 20 minutes, add them to a new list called valid_length_videos.
Step 4: Iterate over the list of valid_length_videos and add any that was from the last 14 days to a new list called valid_videos.
Step 5: Analyze the video titles in valid_videos using Gemini 2.0 Flash or ChatGPT 4o mini.
Step 6: Print the best fits.

#

Guessing you don't know what search youtube for relevant videos means, it means just pass the query to youtube to get the videos (youtube does the relevancy check for you).

#

If you know how to call youtube's api, and have either Gemini or ChatGPT ready to go, this should take about 2-3 hours.

autumn cliff
#

i am trying to call yt api

#

but which one?

stable rune
#

I don't know, never used youtube api.

stable rune
vital dune
#

did you read the getting started page on youtube?

stable rune
#

His advice is much better than mine, follow what he sent there.

autumn cliff
#

i think i gonna give up for this

#

and tell the receiver..something

vital dune
stable rune
autumn cliff
#

assignment

#

nvm

#

bye

#

i should eat something

olive bough
autumn cliff
#

!close

keen lagoonBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.