Metadata-Version: 2.2
Name: NeuralCore
Version: 1.0.3
Summary: A Python client for NeuralCore AI API
Home-page: https://neuralcore.org
Author: NeuralCore
Author-email: neuralcoreorganization@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# NeuralCore Python SDK

The **NeuralCore Python SDK** provides an easy-to-use interface for interacting with the NeuralCore AI APIs, including chat and vision capabilities. This module enables seamless integration of NeuralCoreâ€™s powerful AI features into your applications.

## Features

- **Chat API**: Send messages and interact with NeuralCore's language models.
- **Vision API**: Analyze images with advanced vision models.
- **Custom Configuration**: Set default parameters like temperature and tokens to customize responses.
- **System Messages**: Utilize system messages for providing context or instructions to models.

---

## Installation

Clone or download this repository and ensure you have Python 3.7+ installed. Install the required dependencies:

```bash
pip install NeuralCore
```

---

## Usage

### Initialization

To use the NeuralCore Python SDK, initialize the client with your API key:

```python
from neuralcore import NeuralCore

api_key = "your_api_key_here"
client = NeuralCore(api_key)
```

### Chat API

Send a chat request to NeuralCore. You can include system messages to provide specific instructions or context to the model:

```python
response = client.chat(
    messages=[
        {"role": "system", "content": "You are an assistant that provides concise answers."},
        {"role": "user", "content": "What is the capital of France?"}
    ],
    model="neura-3.5-aala",
    temperature=0.8,
    tokens=150
)
print(response)
```

**Note:** System messages are optional but useful for guiding the model's behavior. Messages should follow the format:
- **role**: "system", "user", or "assistant"
- **content**: Text content for the respective role

### Vision API

Send an image analysis request to NeuralCore. This feature allows models to interpret visual content based on a provided prompt:

```python
response = client.vision(
    image_url="https://example.com/image.jpg",
    prompt="Describe the objects in the image.",
    model="neura-vision-3.5",
    temperature=0.7,
    tokens=200
)
print(response)
```

---

## Models Overview

### Chat Models

NeuralCore offers several models for language processing tasks:
- **neura-1.0**: Base model for general language tasks.
- **neura-2.0**: Enhanced version with improved context handling.
- **neura-3.5-aala**: Latest release with advanced capabilities.
- **llama3-70b-8192**: External model powered by Meta.

### Vision Models

NeuralCore also provides specialized models for image analysis:
- **neura-vision-1.0**: Stable release for basic image analysis.
- **neura-vision-2.0**: Enhanced version with improved detail recognition.
- **neura-vision-3.5**: Latest release with advanced capabilities.

---

## Configuration

You can customize the default settings during initialization:

```python
from neuralcore import NeuralCoreConfig, NeuralCore

config = NeuralCoreConfig(
    api_key="your_api_key_here",
    base_url="https://neuralcore.org/api/n",
    default_temperature=0.6,
    default_tokens=250
)
client = NeuralCore(api_key=config.api_key)
```

---

## Error Handling

The SDK raises a `NeuralCoreError` for any issues with API requests. Example:

```python
try:
    response = client.chat("What's the weather?")
except NeuralCoreError as e:
    print(f"Error: {e}")
```

---

## Requirements

- Python 3.7+
- `requests` library

---

## License

This project is licensed under the MIT License.

---

## Support

For support, contact **NeuralCore Support** or open an issue in this repository.
