(apiKey?: string)
| 46 | }); |
| 47 | console.log(result); |
| 48 | `; |
| 49 | |
| 50 | export const pythonExample = (apiKey?: string) => /* python */ ` |
| 51 | from agentset import Agentset |
| 52 | |
| 53 | client = Agentset( |
| 54 | namespace_id="{{namespace}}", |
| 55 | token="${apiKey ?? "YOUR_API_KEY"}",${pythonSdkApiUrlOption} |
| 56 | ) |
| 57 | |
| 58 | job = client.ingest_jobs.create( |
| 59 | payload={ |
| 60 | "type": "FILE", |
| 61 | "fileUrl": "https://example.com/file.pdf", |
| 62 | "fileName": "document.pdf", |
| 63 | }, |
| 64 | config={ |
| 65 | "chunkSize": 2048, |
| 66 | "mode": "balanced", |
| 67 | "metadata": { |
| 68 | "foo": "bar", |
| 69 | }, |
| 70 | } |
| 71 | ) |
| 72 | |
| 73 | print(f"Upload started: {job.data.id}") |
| 74 | `; |
nothing calls this directly
no outgoing calls
no test coverage detected