Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

add xspace-agent/agent-voice-chat/providers/openai-chat.js

oversteppingdba4283bd1b6
diff --git a/xspace-agent/agent-voice-chat/providers/openai-chat.js b/xspace-agent/agent-voice-chat/providers/openai-chat.js
new file mode 100644
index 000000000..8996c1af3
--- /dev/null
+++ b/xspace-agent/agent-voice-chat/providers/openai-chat.js
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent)
+
+const { BaseSocketProvider } = require("./base-socket-provider")
+
+class OpenAIChatProvider extends BaseSocketProvider {
+ static name = "openai-chat"
+ static requiredEnvVars = ["OPENAI_API_KEY"]
+
+ constructor() {
+ super()
+ this.name = "openai-chat"
+ }
+
+ getApiConfig() {
+ return {
+ url: "https://api.openai.com/v1/chat/completions",
+ headers: {
+ Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
+ "Content-Type": "application/json"
+ },
+ model: process.env.OPENAI_MODEL || "gpt-4o-mini"
+ }
+ }
+}
+
+module.exports = OpenAIChatProvider
+
+