首页 时政热点 科技头条 智能AI 安全攻防 数码硬件 开发者生态 汽车 游戏 社会热点 开源推荐 医疗健康 归档 标签 关于

GitHub 热门项目: llama-stack-apps

摘要

GitHub项目:llama-stack-apps 仓库地址:https://github.com/ogx-ai/llama-stack-apps Stars:4302 | 作者:ogx-ai 项目描述:Agentic components of the Llama Stack APIs ================================================== READ...

Llama Stack llama stack server the https and using your
2026-08-13 1 阅读 约5分钟阅读 GitHub Trending
分享:
字号:
GitHub 项目:llama-stack-apps 仓库地址:https://github.com/ogx-ai/llama-stack-apps 星级:4302 | 作者:ogx-ai 项目描述:Llama Stack API 的代理组件 =================================================== 自述文件内容: # 骆驼堆栈应用程序 [![Discord](https://img.shields.io/discord/1257833999603335178)](https://discord.gg/llama-stack) 此存储库显示了构建在 [Llama Stack](https://github.com/meta-llama/llama-stack) 之上的应用程序示例。从 Llama 3.1 开始,您可以构建具有以下功能的代理应用程序: - 分解任务并执行多步骤推理。 - 使用工具执行一些操作 - 内置:模型具有搜索或代码解释器等工具的内置知识 - 零样本:模型可以学习使用以前未见过的上下文工具定义来调用工具 - 使用 Llama Guard 等模型提供系统级安全保护。 代理应用程序需要一些组件: - 对底层 Llama 系列模型进行推理的能力 - 使用 Llama Guard 系列模型进行安全检查的能力 - 执行工具的能力,包括代码执行环境,以及使用模型的多步骤推理过程进行循环 所有这些组件现在均由单个 Llama Stack 发行版提供。 [Llama Stack](https://github.com/meta-llama/llama-stack) 定义并标准化了这些组件以及使构建生成式 AI 应用程序更加顺利所需的许多其他组件。然后,这些 API 的各种实现通过 **Llama Stack Distribution** 组装在一起。 ## Llama Stack 应用程序入门 要开始使用 Llama Stack Apps,您需要: 1. 安装先决条件 3. 启动 Llama Stack 服务器 4. 将您的客户端代理应用程序连接到 Llama Stack 服务器 启动后,您只需将代理应用程序指向该服务器的 URL(例如“http://localhost:8321”)。 ### 1. 安装先决条件 **Python 包** 我们建议创建一个隔离的 conda Python 环境。 ````bash # 创建并激活虚拟环境 ENV=堆栈 conda 创建-n $ENV python=3.10 cd conda 激活 $ENV # 安装依赖项 pip install -r 要求.txt ```` 这将安装 (1) 构建并启动 Llama Stack 服务器 (2) 将客户端应用程序连接到 Llama Stack 服务器所需的所有依赖项。 ### 2. 启动 Llama Stack 服务器 - 请参阅我们的 [llama-stack](https://github.com/meta-llama/llama-stack) 存储库的[入门指南](https://llama-stack.readthedocs.io/en/latest/getting_started/index.html),了解如何设置 Llama Stack 发行版和运行服务器来为 API 端点提供服务。您应该有一个用于构建客户端应用程序的服务器端点。 一旦你的服务器启动,你应该看到输出—— ```` ... 收听 :::8321 信息:已启动服务器进程 [587053] 信息:等待应用程序启动。 信息:应用程序启动完成。 信息:Uvicorn 在 http://[::]:8321 上运行(按 CTRL+C 退出) ```` ### 3. 测试代理演示脚本 我们构建了用于与 Stack 服务器交互的示例演示脚本。 当服务器运行时,您可以运行来测试一个简单的代理 此示例需要 API 密钥 f
这篇文章对您有帮助吗?

订阅66必读

每日精选科技资讯,直达你的邮箱