3 ms·
interesting! I hadn't seen that before ai_fn is just a specific way to use Marvin's Bot abstraction, which is one of the few abstractions Marvin offers but a
by nate_nowack 4y ago
interesting! I hadn't seen that before
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-1490521576 https://github.com/PrefectHQ/marvin/issues/106#issuecomment-...
- leobg 4y agoThe example in the last link you posted is misleading. GPT does not actually crawl the URL. It hallucinates the answer based on the words in the URL itself. Even though it then casts that hallucinated answer neatly into a Pydantic type. Try it with a URL that does not actually exist. Or a pastebin whose link is just some random hash. The first rule is not to fool yourself. And you are the easiest person to fool. —Richard Feynman about ChatGPT ;-)
- nate_nowack 3y agohi, just seeing this! 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/a16da0594afc2bb751428907e4c2a3cd https://gist.github.com/zzstoatzz/a16da0594afc2bb751428907e4... feel free to try it yourself :)