ryansurf / cli-surf

Get surf and ocean data from the command line interface
7 stars 10 forks source link

GPT argument #27

Closed ryansurf closed 1 month ago

ryansurf commented 2 months ago

Would be cool to pass an arg like gpt to use a service like this to generate a surf report based on the current data

ryansurf commented 2 months ago

Can also have a .env var to set data like: skill level, board size, etc that is passed as an arg to the gpt

K-dash commented 1 month ago

Hey, that's a pretty cool idea! With GPT, the possibilities are endless.🤯 Of course, we'll need to put our heads together and figure out the best ways to harness its power.

ryansurf commented 1 month ago

@K-dash I'm thinking of using the repo linked above, really easy to set up.

The problem is, the model it uses is a bit... stupid. I think we can have two options, use the default model as the one above, or, if the user has an API key for some other model(OpenAI or similar), they can use that insead.

ryansurf commented 1 month ago

So I've implemented this commit b19db65 which adds the basic functionality. It is failing the tests with a ModuleNotFoundError, going to debug that one later :sweat_smile:

The helper.py code is getting messy, I need to dedicate some time to clean it up lol

Edit: Fixed the ModuleNotFoundError error in commit 1db9e499ce81af179cdc46aac7807e04314b54a8 (dumb mistake)

Weird thing happened though, I used pipreqs to remake the requirements.txt file and it didn't add the email_validator module, so testing failed (only in GH Actions, not my local setup). I had to manually add this module to the requirements, 95acbcf80ac8a33dcad3829cddb206f5cf86367d.

K-dash commented 1 month ago

@ryansurf

Weird thing happened though, I used pipreqs to remake the requirements.txt file and it didn't add the email_validator module, so testing failed (only in GH Actions, not my local setup). I had to manually add this module to the requirements,

Hmm, that's odd. This PR , it clearly shows that you added email_validator to the requirements.txt file.

It's possible that something might have accidentally caused a regression. 🤔

ryansurf commented 1 month ago

openai gpt added! 0b0dfb32c94d787e8ff87f06bd806e998bc7e415