Skip to content

sync: add aichat resource (POST /aichat/conversations)#25

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/sync-update-from-docs
Draft

sync: add aichat resource (POST /aichat/conversations)#25
Copilot wants to merge 2 commits intomainfrom
copilot/sync-update-from-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

The aichat service was absent from both SDKs despite being defined in the Docs OpenAPI spec. This adds it as a first-class resource alongside the existing chat and openai namespaces.

Changes

  • New AiChat resource (TypeScript + Python, sync + async) — wraps POST /aichat/conversations with typed params: required model + question, optional id, preset, stateful, references
  • AiChatModel type — union/Literal covering all 78 models from the spec (GPT-5.x, GPT-4.x, o1/o3/o4-mini, DeepSeek, Grok-3, GLM series)
  • Client wiringclient.aichat exposed on both AceDataCloud and AsyncAceDataCloud
  • Public exportsAiChatModel added to index.ts and __init__.py

Usage

const reply = await client.aichat.create({
  model: 'gpt-4o',
  question: 'What is the capital of France?',
});
console.log(reply.answer);
reply = client.aichat.create(model="gpt-4o", question="What is the capital of France?")
print(reply["answer"])

Copilot AI changed the title [WIP] Sync SDK with latest API specs from Docs sync: add aichat resource (POST /aichat/conversations) Apr 25, 2026
Copilot AI requested a review from Germey April 25, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sync: update from Docs (b3b2922 docs: sync from PlatformBackend (zh-CN base + translations) [automated])

2 participants