TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: LLMEasyTools – Tools for LLM agents (Python lib)

2 点作者 zby9 个月前
A year ago I started working on a agentic RAG idea [1]. I quickly decided that I don&#x27;t like the existing frameworks and started writing everything from scratch. The agentic RAG is not yet ready - but I extracted the code for dealing with function calling and published it. It is a small library for generating schemas from function signatures and for calling these functions using parameters constructed by the LLM.<p>There is not much code in it - but it is not as trivial as it would seem when you try to cover all the possible cases.<p>I think it is now quite well tested and useful.<p>1 - <a href="https:&#x2F;&#x2F;zzbbyy.substack.com&#x2F;p&#x2F;ai-applications-for-question-answering" rel="nofollow">https:&#x2F;&#x2F;zzbbyy.substack.com&#x2F;p&#x2F;ai-applications-for-question-a...</a>

2 条评论

spdustin9 个月前
The issue with using Pydantic&#x27;s model_to_json is that nested objects will return a nested schema, and OpenAI ignores description annotations for anything not at the root level. In practice, that means any nested parameters (e.g. array of objects) need to be really well-named, or have their descriptions hoisted up to the parent parameter.<p>Even better: extract them to their own function, list all the resulting functions when composing the completion request, and re-assemble the final object when the completion is returned.
namanyayg9 个月前
nice work on extracting and open-sourcing this lib!<p>I&#x27;m working on an agentic b2b ai myself and i found the process to add different tools quite annoying. This is a great solution. alas, my code is in TypeScript.<p>i&#x27;m curious, how do you handle errors and edge cases when the LLM-generated params don&#x27;t quite match the function signature?
评论 #41225252 未加载