Live data from Hacker News

Show HN: Python package for interfacing with ChatGPT with minimized complexity

github.com

11–20 of 36 posts

Re: Show HN: Python package for interfacing with ChatGPT with minimized complexity

#13
post #9

Nice! Totally agree with the project goals, it seems too many other packages are created by people who are researchers (or enthusiasts) first and software developers second, and it shows. I see you're using Pydantic. I've recently been playing with using pydantic to implement chatgpt functions, making it a bit easier to define functions (tools) with more control over the attributes, like this: class SearchWeb(pydanti…

Ah, I see I've been ninja'd by about 17 hours: https://github.com/minimaxir/simpleaichat/releases/tag/v0.2.... :-D

Re: Show HN: Python package for interfacing with ChatGPT with minimized complexity

#15
post #9

Nice! Totally agree with the project goals, it seems too many other packages are created by people who are researchers (or enthusiasts) first and software developers second, and it shows. I see you're using Pydantic. I've recently been playing with using pydantic to implement chatgpt functions, making it a bit easier to define functions (tools) with more control over the attributes, like this: class SearchWeb(pydanti…

There was another post today about using Pydantic for function enabled completions: https://github.com/jxnl/openai_function_call

I whipped up an example doing something similar last Friday using a decorator, inspect, ast and __doc__ usage: https://gist.github.com/kordless/7d306b0646bf0b56c44ebca2b8e.... The example pulls top results from Algoia's HN search and then chains them into another prompt for GPT-X. The blog post is here: https://www.featurebase.com/blog/function-integration-in-ope...

Currently integrating this approach into PythonGPT[1], which will build a function on the fly, extract the method info, then call the code in exec(). I would label it "very dangerous"...

[1] https://github.com/FeatureBaseDB/PythonGPT

Re: Show HN: Python package for interfacing with ChatGPT with minimized complexity

#16
Is interfacting with the GPT-4 API acting as if you are the ChatGPT UI against terms of service? I was under the impression it was and they had a bunch of methods to protect against this. They want you using ChatGPT for $20/mo and then paying for GPT-4 API usage separately per token from what I can tell.

Re: Show HN: Python package for interfacing with ChatGPT with minimized complexity

#18

Earlier quoted context omitted.

I was mixed about putting it in the base package but you can get the same behavior with the tenacity package.

Errors are so common with these endpoints, not having retry out of the box just makes it harder to hack on which I think is against the spirit?

On the other hand, automatic retires can be suprising, especially when they don't completely understand the returned error and retry on errors they shouldn't.

I just wasted a couple hours the other week due to langchainjs defaulting to retrying errors which were ultimately caused by timeouts and would never complete.

Re: Show HN: Python package for interfacing with ChatGPT with minimized complexity

#19
post #9

Nice! Totally agree with the project goals, it seems too many other packages are created by people who are researchers (or enthusiasts) first and software developers second, and it shows. I see you're using Pydantic. I've recently been playing with using pydantic to implement chatgpt functions, making it a bit easier to define functions (tools) with more control over the attributes, like this: class SearchWeb(pydanti…

There was another post today about using Pydantic for function enabled completions: https://github.com/jxnl/openai_function_call I whipped up an example doing something similar last Friday using a decorator, inspect, ast and __doc__ usage: https://gist.github.com/kordless/7d306b0646bf0b56c44ebca2b8e... . The example pulls top results from Algoia's HN search and then chains them into another prompt for GPT-X. The blog…

> There was another post today about using Pydantic for function enabled completions

That post let me know that pydantic's schema() function actually worked to produce a valid JSON schema, so I was able to optimize from there. (there may be a few optimizations still to be done: schema() also returns an unnecessary title field and I need to experiment if I need to remove it)

Re: Show HN: Python package for interfacing with ChatGPT with minimized complexity

#20

Is interfacting with the GPT-4 API acting as if you are the ChatGPT UI against terms of service? I was under the impression it was and they had a bunch of methods to protect against this. They want you using ChatGPT for $20/mo and then paying for GPT-4 API usage separately per token from what I can tell.

You have to have an approved GPT-4 API key to use model="gpt-4". Nothing in this package circumvents it, which is what the free GPT-4 apps were doing.
Post reply on HN