@cartanova/qgrid-ai-sdk 2.19.2 → 2.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +2 -1
- package/README.md +2 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -558,7 +558,8 @@ app.post("/live", async (req, res) => {
|
|
|
558
558
|
```
|
|
559
559
|
|
|
560
560
|
- 위임: GPT-Live는 혼자 답할 수 없는 일(검색, 추론)을 클라이언트에 넘기고, 답이 올 때까지 말을 이어갑니다. Codex가 자기 에이전트로 이 요청을 처리하듯 qgrid가 처리합니다. 지금까지의 대화와 함께 세션의 위임 모델로 qgrid query를 돌리고, 음성이 그 답을 말합니다. 세션마다 `params.delegation`으로 고릅니다. `model`(qgrid가 서비스하는 모델, 대시보드 채팅과 같은 목록인 서버 `qgrid.types.ts`의 `QGRID_MODELS`. 기본 `openai/gpt-6-luna`, 목록 밖은 HTTP 400), `effort`(기본 `low`, `medium`, `high`), `webSearch`(제공자의 hosted 웹 검색, `openai/`·`grok/`만, 기본 꺼짐). 위임이 실패하면 짧은 실패 안내를 돌려주어 음성이 기다리지 않고 그 사실을 말하게 합니다. 위임은 각각 `delegation` tool 단계로 기록되고, 백엔드 비용이 실행 비용에 더해집니다.
|
|
561
|
-
-
|
|
561
|
+
- 이전 대화: `params.history`로 세션을 이전 대화에서 시작합니다. 형식은 `[{ role: "user" | "assistant" | "developer", text }]`이고 오래된 것부터 넣습니다. 지난 live 세션의 턴이든 텍스트 채팅 기록이든 똑같이 넣으면, 음성과 위임 모두 이미 나눈 대화로 받아들입니다. 최대 128개, 100만 자까지입니다. 128개를 넘거나 다른 역할을 넣으면 OpenAI가 call은 받지만 세션을 시작하지 않아서, 서버가 미리 HTTP 400으로 막습니다. 세션을 넘겨 대화를 이어 가거나 네트워크가 끊긴 뒤 다시 붙을 때는 지난 세션의 턴을 넣으면 됩니다.
|
|
562
|
+
- 요청 `params`: `sdp`(offer, 필수), `voice`, `instructions`, `history`, `delegation`, 그리고 다른 엔드포인트와 같은 `tokenName`(`openai/` 접두사), `projectName`, `logger`. `model`은 생략하거나 `openai/gpt-live-1`만 됩니다. 다른 값은 HTTP 400입니다.
|
|
562
563
|
- 응답: `sdp`(answer), `callId`, `model`, `voice`, `tokenName`, `requestLogId`. 요청 로그는 세션 내내 `running`이고, 턴이 끝날 때마다 세션 시간이 붙은 대화가 갱신되어 진행 중에도 볼 수 있습니다. 세션이 끝나면 비용 추정치(세션 오디오 분당 $0.05, API 정가)와 함께 마무리됩니다.
|
|
563
564
|
- 음성: `cove`(기본) `juniper maple spruce ember vale breeze arbor sol aube bubbie haetsal hanul himari leher miko neer porto rindo rio rivage selva sonna tinta viola`. realtime 음성 합성용 음성(`marin` 등)은 쓸 수 없습니다. OpenAI가 call은 받아 주지만 세션이 시작되지 않기 때문에 서버가 HTTP 400으로 막습니다.
|
|
564
565
|
- 데이터 채널 이벤트: `turn.created`, `turn.delta`, `turn.done`이 말하는 대로 각 턴의 `role`과 `transcript`를 전하고, `session.usage.updated`와 `session.closed`가 `usage.audio_duration_ms`를 전합니다. 세션은 시작 2시간 뒤 스스로 끝납니다.
|
package/README.md
CHANGED
|
@@ -570,7 +570,8 @@ app.post("/live", async (req, res) => {
|
|
|
570
570
|
```
|
|
571
571
|
|
|
572
572
|
- Delegation: GPT-Live hands what it cannot answer itself (lookups, reasoning) to the client and keeps talking until the answer arrives. qgrid answers it, as Codex answers with its own agent: it runs the request as a qgrid query on the session's delegation model, with the conversation so far, and the voice speaks the reply. Choose per session with `params.delegation`: `model` (any model qgrid serves, the list the dashboard chat offers: `QGRID_MODELS` in the server's `qgrid.types.ts`; default `openai/gpt-6-luna`; others are rejected with HTTP 400), `effort` (`low` default, `medium`, `high`) and `webSearch` (the provider's hosted web search, `openai/` and `grok/` only; off by default). A failed delegation is answered with a short failure note so the voice can say so instead of waiting. Each delegation is logged as a `delegation` tool step, and its backend cost is added to the run's cost.
|
|
573
|
-
-
|
|
573
|
+
- History: `params.history` starts the session from an earlier conversation, `[{ role: "user" | "assistant" | "developer", text }]`, oldest first. It can be a past live session's turns or a text chat alike; the voice and its delegations treat it as what was already said. At most 128 items and 1,000,000 characters: past 128 items, or with any other role, OpenAI accepts the call but never starts the session, so the server answers HTTP 400 first. To carry a conversation across sessions (or reconnect after a dropped network), pass the previous session's turns.
|
|
574
|
+
- Request `params`: `sdp` (the offer, required), `voice`, `instructions`, `history`, `delegation`, and the usual `tokenName` (`openai/` prefix), `projectName` and `logger`. `model` may be omitted or `openai/gpt-live-1`; any other value is rejected with HTTP 400.
|
|
574
575
|
- Response: `sdp` (the answer), `callId`, `model`, `voice`, `tokenName` and `requestLogId`. The request log stays `running` for the whole session and its conversation, with each turn's session time, is rewritten after every finished turn, so it can be read while the session runs. When the session ends the run is finished with a cost estimate of $0.05 per minute of session audio (the API list price).
|
|
575
576
|
- Voices: `cove` (default) `juniper maple spruce ember vale breeze arbor sol aube bubbie haetsal hanul himari leher miko neer porto rindo rio rivage selva sonna tinta viola`. The realtime speech voices (`marin` and others) do not apply; the server rejects them with HTTP 400, because OpenAI would accept the call and then never start the session.
|
|
576
577
|
- Data channel events: `turn.created`, `turn.delta` and `turn.done` carry each turn's `role` and `transcript` as it is spoken; `session.usage.updated` and `session.closed` carry `usage.audio_duration_ms`. A session ends on its own two hours after it starts.
|
package/dist/index.d.ts
CHANGED
|
@@ -154,10 +154,10 @@ type QgridGrokModel = "grok/grok-4.7" | "grok/grok-4.7-build-fast" | "grok/grok-
|
|
|
154
154
|
*/
|
|
155
155
|
declare const qgridXaiProviderOptionsSchema: z.ZodObject<{
|
|
156
156
|
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
none: "none";
|
|
157
158
|
low: "low";
|
|
158
159
|
medium: "medium";
|
|
159
160
|
high: "high";
|
|
160
|
-
none: "none";
|
|
161
161
|
xhigh: "xhigh";
|
|
162
162
|
}>>;
|
|
163
163
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|