Metadata-Version: 2.4
Name: socratic-nexus
Version: 0.3.3
Summary: Universal LLM client for production - works with Claude, GPT-4, Gemini, Llama, and any LLM. Built-in integrations with Openclaw and LangChain.
Author: Socrates Nexus Contributors
License: MIT
Project-URL: Homepage, https://github.com/Nireus79/socrates-nexus
Project-URL: Documentation, https://github.com/Nireus79/socrates-nexus/tree/main/docs
Project-URL: Repository, https://github.com/Nireus79/socrates-nexus
Project-URL: Source Code, https://github.com/Nireus79/socrates-nexus
Project-URL: Bug Tracker, https://github.com/Nireus79/socrates-nexus/issues
Project-URL: Changelog, https://github.com/Nireus79/socrates-nexus/releases
Keywords: llm,ai,claude,gpt-4,gemini,ollama,llama,production,multi-llm,universal-client,retry,streaming,async,token-tracking
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0.0
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.40.0; extra == "anthropic"
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == "openai"
Provides-Extra: google
Requires-Dist: google-generativeai>=0.1.0rc1; extra == "google"
Provides-Extra: ollama
Requires-Dist: ollama>=0.0.8; extra == "ollama"
Provides-Extra: huggingface
Requires-Dist: huggingface-hub>=0.17.0; extra == "huggingface"
Provides-Extra: openclaw
Provides-Extra: langchain
Requires-Dist: langchain>=0.1.0; extra == "langchain"
Provides-Extra: all
Requires-Dist: anthropic>=0.40.0; extra == "all"
Requires-Dist: openai>=1.0.0; extra == "all"
Requires-Dist: ollama>=0.0.8; extra == "all"
Requires-Dist: huggingface-hub>=0.17.0; extra == "all"
Provides-Extra: integrations
Requires-Dist: langchain>=0.1.0; extra == "integrations"
Provides-Extra: full
Requires-Dist: anthropic>=0.40.0; extra == "full"
Requires-Dist: openai>=1.0.0; extra == "full"
Requires-Dist: google-generativeai>=0.3.0; extra == "full"
Requires-Dist: ollama>=0.0.8; extra == "full"
Requires-Dist: huggingface-hub>=0.17.0; extra == "full"
Requires-Dist: langchain>=0.1.0; extra == "full"
Provides-Extra: async
Requires-Dist: asyncio>=3.4.3; extra == "async"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# Socratic Nexus (socrates-nexus)

Universal LLM abstraction layer providing unified access to multiple AI providers

## Overview

socrates-nexus is a specialized component of the Socratic ecosystem that provides comprehensive functionality for universal llm abstraction layer providing unified access to multiple ai providers. It offers a production-ready, well-tested solution for integrating into larger Socratic systems.

## Key Features

- Multi-provider support
- Unified client interface
- Async/sync API support
- Model standardization

## Installation

### Prerequisites
- Python 3.8+
- pip or poetry package manager

### Via pip

```bash
pip install socrates-nexus
```

### Via poetry

```bash
poetry add socrates-nexus
```

### From source

```bash
git clone https://github.com/socratic-ai/socrates-nexus.git
cd socrates-nexus
pip install -e .
```

## Quick Start

### Basic Usage

```python
from socrates_nexus import Client

# Initialize the component
client = Client()

# Perform basic operation
result = client.process()
print(result)
```

### Configuration

```python
from socrates_nexus import Client

# Configure with custom settings
client = Client(
    api_key="your-api-key",
    model="claude-3-5-haiku",
    timeout=30
)

# Use the client
response = client.query("What is the essence of learning?")
```

## Core Components

- **Client**: Main interface for interacting
- **Providers**: Provider-specific implementations
- **Models**: Model definitions and configurations
- **Async Client**: Asynchronous version
- **Exceptions**: Custom error handling

## Architecture Overview

socrates-nexus follows a modular, layered architecture:

- **Client Layer**: Public API for external consumers
- **Processing Layer**: Core business logic and algorithms
- **Integration Layer**: Connections to external services and APIs
- **Data Layer**: State management and data persistence

## Integration with Socratic Ecosystem

socrates-nexus integrates seamlessly with:

- **socrates-nexus**: Unified LLM provider interface
- **socratic-rag**: Knowledge retrieval and augmentation
- **socratic-core**: Common utilities and base classes
- **Other ecosystem components**: As needed for specific use cases

## Dependencies

```
- anthropic
- openai
- google-generativeai
- langchain
```

## Performance Considerations

- **Caching**: Intelligent caching for frequently accessed data
- **Async Support**: Full async/await support for non-blocking I/O
- **Scalability**: Designed for high-concurrency scenarios
- **Resource Efficiency**: Optimized memory and CPU usage

## Error Handling

The library provides comprehensive error handling:

```python
from socrates_nexus import Client, Error

try:
    client = Client()
    result = client.process()
except Error as e:
    print(f"Error: {e}")
```

## Testing

Run the test suite:

```bash
pytest tests/
```

With coverage reporting:

```bash
pytest --cov=socrates_nexus tests/
```

## API Reference

For complete API documentation, see [ARCHITECTURE.md](ARCHITECTURE.md)

## Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

## Support & Resources

- GitHub Issues: https://github.com/socratic-ai/socrates-nexus/issues
- Documentation: https://socratic-docs.readthedocs.io/socrates-nexus
- Discussions: https://github.com/socratic-ai/socrates-nexus/discussions

## License

MIT License - See LICENSE file for details

---

Part of the Socratic Ecosystem
