GitHub 仓库

jackmpcollins/magentic

Python 首次收录 2023-06-18 更新于 2026-07-16 查看源 ↗

GitHub 仓库 中按Star排名第 432 / 共 783

2.4k Star

Seamlessly integrate LLMs as Python functions

项目介绍

Seamlessly integrate Large Language Models into Python code. Use the @prompt and @chatprompt decorators to create functions that return structured output from an LLM. Combine LLM queries and tool use with traditional Python code to build complex agentic systems.

Configure your OpenAI API key by setting the OPENAIAPIKEY environment variable. To configure a different LLM provider see [Configuration] for more.

The @prompt decorator allows you to define a template for a Large Language Model (LLM) prompt as a Python function. When this function is called, the arguments are inserted into the template, then this prompt is sent to an LLM which generates the function output.

The @prompt decorator…

摘自 github.com/jackmpcollins/magentic

最新指标

Star 2.4k 2026-07-16
Fork 127 2026-07-16
提交 360 2026-07-16
发布 65 2026-07-16
Watcher 10 2026-07-16
开放 issue 40 2026-07-16
开放 PR 9 2026-07-16