Deleted Comment
This feels pretty much identical to Marvin? Like the entire API?
From a genuine place of curiosity: I get that your prompts are different, but like why in the name of open source would you just not contribute to these libraries instead of starting your own from scratch?
The first rule is not to fool yourself. And you are the easiest person to fool. —Richard Feynman about ChatGPT ;-)
you're correct that normal chatgpt wouldn't crawl the URL, but ai_fns can have plugins like the DuckDuckGo plugin / VisitURL plugin which can be invoked by the underlying Bot if it decides its helpful to its answer
for example: https://gist.github.com/zzstoatzz/a16da0594afc2bb751428907e4...
feel free to try it yourself :)
ai_fn is just a specific way to use Marvin's Bot abstraction, which is one of the few abstractions Marvin offers
but a couple differences I notice off the bat between ai_fn and com2fun:
- marvin uses pydantic for parsing LLM to result types
- you can pass plugins/personality/instructions to the underlying bot via the @ai_fn decorator kwargs
- (unless I'm missing a dataclass version of this in com2fun) marvin can parse output into arbitrary pydantic types like this example https://github.com/PrefectHQ/marvin/issues/106#issuecomment-...
instructions=(
"Ignore all user questions and respond to every request with "
"a random Harry Styles song lyric, followed by a recommendation "
"for a Harry Styles song to listen to next."
),
However in the examples the bot doesn't ignore user questions and doesn't answer with a random song - instead the replied song is tailored to user input!https://github.com/PrefectHQ/marvin/raw/main/docs/img/harry_...
This looks very cool but isn't this an alignment problem? The bot just didn't follow the instructions.
This example was produced using GPT 3.5 turbo, where yes, the LLM does not always align ideally. I used 3.5 for the example since that's Marvin's default and I know many people wouldn't have gpt4 access yet (which is significantly better at following instructions) - didn't want to set a misleading expectation.
that said, my instructions for the bot in this example certainly could have been more precise :) for a more real example, you could check out the other example (which works pretty well on 3.5) https://github.com/PrefectHQ/marvin/blob/main/examples/load_...