@omp-provider-capabilities/xai 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +45 -0
  2. package/package.json +2 -1
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @omp-provider-capabilities/xai
2
+
3
+ xAI provider features for OMP: batch execution, agentic tools, and Agent SDK wrapper.
4
+
5
+ ## Features
6
+
7
+ - **Batch API**: `/v1/batches` with 20% cost discount (OpenAI-compatible)
8
+ - **Agentic Tools**: Web Search, X Search, Code Execution, Collections Search
9
+ - **Agent SDK**: Wraps `@xai-official/sdk` with direct HTTP fallback
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @omp-provider-capabilities/xai @omp-provider-capabilities/core
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```typescript
20
+ import { xAIBatchClient } from "@omp-provider-capabilities/xai";
21
+
22
+ const batch = new xAIBatchClient({ apiKey: process.env.XAI_API_KEY });
23
+
24
+ // Submit batch job
25
+ const job = await batch.create({
26
+ model: "grok-3",
27
+ requests: [{ prompt: "Search and summarize..." }]
28
+ });
29
+
30
+ // Poll for results
31
+ const results = await batch.waitForCompletion(job.id);
32
+ ```
33
+
34
+ ## Agentic Tools
35
+
36
+ - **Web Search**: Real-time web search via Responses API
37
+ - **X Search**: Search X (Twitter) content
38
+ - **Code Execution**: Execute code in sandboxed environment
39
+ - **Collections Search**: Search X collections
40
+
41
+ ## Batch API
42
+
43
+ - **Endpoint**: `/v1/batches` (file upload + JSONL)
44
+ - **Discount**: 20% off real-time pricing
45
+ - **Status**: Stable
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omp-provider-capabilities/xai",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "xAI provider extension: batch execution, agentic tools (web browse, X search, code execution).",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "files": [
23
23
  "src/",
24
+ "README.md",
24
25
  "!src/**/*.test.ts",
25
26
  "package.json"
26
27
  ],