# Ruby OpenAI
使用 [OpenAI API](https://openai.com/blog/openai-api/) 与 Ruby!❤️
使用 Responses API 流式传输 GPT-5 聊天,发起 Realtime WebRTC 对话,以及更多功能...
**赞助商**
|
_[InferToGo](https://infertogo.com/?utm_source=ruby-openai) - 为您的 PaaS 应用提供的推理插件。_
|
_[SerpApi - 搜索 API](https://serpapi.com/?utm_source=ruby-openai) - 通过我们简单的 API,利用 Google 和 Bing 等搜索引擎的数据来增强您的 LLM 知识。_
|
[ Ruby AI Builders Discord](https://discord.gg/k4Uc224xVD) | [ X](https://x.com/alexrudall) | [ Anthropic Gem](https://github.com/alexrudall/anthropic) | [ Midjourney Gem](https://github.com/alexrudall/midjourney) | [♥️ 感谢所有赞助商!](https://github.com/sponsors/alexrudall)
## 目录
- [Ruby OpenAI](#ruby-OpenAI)
- [目录](#contents)
- [项目策略](#project-policies)
- [安装](#installation)
- [Bundler](#bundler)
- [Gem install](#gem-install)
- [如何使用](#how-to-use)
- [快速入门](#quickstart)
- [带配置](#with-config)
- [自定义超时或基础 URI](#custom-timeout-or-base-uri)
- [每个客户端的额外头部](#extra-headers-per-client)
- [日志](#logging)
- [错误](#errors)
- [Faraday 中间件](#faraday-middleware)
- [Azure](#Azure)
- [DeepSeek](#DeepSeek)
- [Ollama](#ollama)
- [Groq](#groq)
- [Gemini](#Gemini)
- [计数令牌](#counting-tokens)
- [模型](#models)
- [聊天](#chat)
- [流式聊天](#streaming-chat)
- [视觉](#vision)
- [JSON 模式](#json-mode)
- [响应 API](#responses-api)
- [创建响应](#create-a-response)
- [回复消息](#follow-up-messages)
- [工具调用](#tool-calls)
- [流式](#streaming)
- [检索响应](#retrieve-a-response)
- [删除响应](#delete-a-response)
- [列出输入](#list-inputs)
- [查询](#queries)
- [事件](#events)
- [调试](#debugging)
- [文档](#documentation)
[](https://infertogo.com/?utm_source=ruby-openai)
[](https://serpapi.com/?utm_source=ruby-openai)