aiXplainKit v2: Clean-slate SDK rewrite aligned with Python v2 architecture#13
Open
MaiaJP-AIXplain wants to merge 1 commit intomainfrom
Open
aiXplainKit v2: Clean-slate SDK rewrite aligned with Python v2 architecture#13MaiaJP-AIXplain wants to merge 1 commit intomainfrom
MaiaJP-AIXplain wants to merge 1 commit intomainfrom
Conversation
- Enhanced README with a new quick start guide, installation instructions, and detailed API key setup options. - Added multiple example files demonstrating usage of models, agents, tools, indexing, error handling, and advanced agent features. - Updated .gitignore to exclude new documentation files. - Introduced a new `Aixplain` class as the main entry point for the SDK, replacing the previous `AiXplainKit` class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete v2 rewrite of the aiXplainKit Swift SDK, replacing all v1 code with a clean-slate implementation aligned with the aiXplain Python SDK v2.
185 files changed (~9,000 lines added, ~8,800 lines removed).
What changed
Credentialtype with API-key and environment-variable resolution;AuthenticationSchemeenum for header injection.AixplainClientwith configurable base URL, retry policy, and typedResponse<T>wrapper; replaces the oldNetworkinglayer.Aixplaincontext object replacesAiXplainKit.shared/APIKeyManagerglobals.Agent.get,Agent.search,Agent.save,Agent.run,Agent.delete, multi-turn sessions viagenerateSessionId(), output format control, task/history introspection, and cloning.Model.get,Model.search,Model.run, and streaming support.ModelResultresponse type.Tool(subclass ofModel),Integration.get/connect,AgentToolConvertibleprotocol,AgentToolDictfor agent composition.Index.get,Index.create,Index.upsert,Index.searchwithIndexFilteroperators andRecordtype.BaseResourceprotocol,Page<T>pagination,AnyCodable, enums forAIFunction,AssetStatus,Supplier,ToolType.AixplainErrorwith nested domain errors (APIError,AuthError,ValidationError,ResourceError,TimeoutError,FileUploadError) anduserMessagefor display.docs/rfcs/describing every architectural decision.Agents,Auth,Client,Errors,Index,Models,Resources,Tools) and E2E tests (Agent,Client,Index,Model,Tool).Networking,Provider/*,Modules/*, oldAssethierarchy,APIKeyManager,FileManager, v1 tutorials and DocC snippets).How to test
Unit tests (no API key needed)
swift test --filter UnitCovers JSON decoding, error construction, credential resolution, model/agent/tool/index/resource logic, and client request building.
E2E tests (requires API key)
Runs live calls against the aiXplain platform for agents, models, tools, indexes, and the HTTP client.
Run examples manually
Open any file in
Examples/(e.g.01-QuickStart.swift) and follow the inline instructions — each is a self-contained snippet showing a specific feature.Build check
Verify the package compiles cleanly on macOS (or Linux).
Made with Cursor