@acedatacloud/sdk 2026.1004.0 → 2026.1005.1
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.md +43 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,6 +55,49 @@ for await (const chunk of stream) {
|
|
|
55
55
|
| `client.files` | File uploads |
|
|
56
56
|
| `client.platform` | Applications, credentials, models management |
|
|
57
57
|
|
|
58
|
+
## Native Claude Messages
|
|
59
|
+
|
|
60
|
+
Thinking and output configuration are passed through without SDK model-specific
|
|
61
|
+
enum or combination checks. The selected model determines which values it accepts.
|
|
62
|
+
For the beta `display: 'updates'` mode, set the required header on a dedicated
|
|
63
|
+
client (client headers apply to every request):
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
const claude = new AceDataCloud({
|
|
67
|
+
apiToken: 'your-token',
|
|
68
|
+
headers: { 'anthropic-beta': 'thinking-display-updates-2026-08-18' },
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const response = await claude.chat.messages.create({
|
|
72
|
+
model: 'claude-sonnet-5-5',
|
|
73
|
+
messages: [{ role: 'user', content: 'Explain this code.' }],
|
|
74
|
+
metadata: { user_id: 'example-user-001' },
|
|
75
|
+
thinking: { type: 'adaptive', display: 'updates' },
|
|
76
|
+
output_config: { effort: 'high' },
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Streaming and `claude.chat.messages.countTokens(...)` also preserve thinking
|
|
81
|
+
configuration. Parameter pass-through does not guarantee model support; API errors
|
|
82
|
+
are returned through the SDK's normal error handling.
|
|
83
|
+
|
|
84
|
+
Optional `metadata.user_id` is passed as request metadata, not conversation content.
|
|
85
|
+
Use a stable identifier without personal information; it does not replace Bearer
|
|
86
|
+
authentication or require the thinking beta header.
|
|
87
|
+
|
|
88
|
+
## OpenAI Embeddings
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
const embeddings = await client.openai.embeddings.create({
|
|
92
|
+
model: 'text-embedding-3-small',
|
|
93
|
+
input: 'The food was delicious and the waiter...',
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Supported models are `text-embedding-3-small` and `text-embedding-3-large`.
|
|
98
|
+
`text-embedding-ada-002` is no longer available. When migrating an existing index,
|
|
99
|
+
regenerate its vectors and rebuild the index; do not mix old and new model vectors.
|
|
100
|
+
|
|
58
101
|
## Image Generation (with Task Polling)
|
|
59
102
|
|
|
60
103
|
```typescript
|