semvec/pypi-packages huggingface dataset:
leonardoWrapper 1.1.3
A wrapper for the leonardo.ai image generation
Requires Python: >=3.6

# Image Generation with Leonardo Library

This document outlines the process of generating images using the `Leonardo` library in Python, as demonstrated in the provided code snippet.

## Overview

The code snippet demonstrates how to use the `Leonardo` class from the `leonardoWrapper` module to generate an image based on a textual prompt. The example generates an image of a fantastical scene inside an ancient, otherworldly library.

## Steps

1. **Initialization**: The `Leonardo` class is initialized with the account's cookie (since a captcha was added and I don't want to reveal my turnstile solver).

    ```python
    from leonardoWrapper import Leonardo

    leonardo = Leonardo(cookie="your_cookie")
    ```

    > **Note**: Replace `your_cookie` with your actual cookie.

2. **Creating an Image Generation Request**: An image generation request is created with specific parameters such as the prompt, number of images, model ID, model version, image dimensions, and guidance scale.

    ```python
    get_generation_id = leonardo.create_generate_image(
        prompt="Create a fantastical and visually stunning scene inside an ancient, otherworldly library...",
        amount_of_images=1,
        model_id="model_id",
        sd_version="model_version", # for some models you have to provide the sd_version
        width=1024,
        height=768,
        guidance_scale=7
    )
    ```

    > **Note**: Replace `model_identifier` and `model_version` with the specific model ID and version you wish to use. For a list of available models and their versions, see [models.md](https://github.com/theunkowndude/leonardoWrapper/blob/main/models.md). Please note that you can run `gen_models_md.py` to update the documentation with the latest model information.


3. **Waiting for Image Generation**: The script waits for the image generation process to complete.

    ```python
    leonardo.wait_for_image_generation(creation_id=get_generation_id)
    ```

4. **Retrieving the Generated Image**: The generated image is retrieved, and its details are printed.

    ```python
    generated_image = leonardo.get_image_generation(creation_id=get_generation_id)

    print(generated_image)
    print(generated_image["generated_images"][0]["url"])
    ```

## Conclusion

This guide introduces the fundamental steps for generating images with the Leonardo library. It encompasses the initialization of the Leonardo class, formulation of an image generation request, supervision of account management throughout the generation phase, and the final retrieval of the created image.
signals 0.1.0a5
Primitives for transparent reactive programming in Python
Requires Python: >=3.8

# signals

primitives for transparent reactive programming in python

## install

```python
pip install signals
```

## usage

```python
from signals import Signal, effect

a = Signal(0)
b = Signal(2)

def c():
    return a() + b()

print(c()) # 2

a.set(1)
print(c()) # 3

b.set(3)
print(c()) # 4

# Log the values of a, b, c whenever one changes
@effect
def log_abc():
    print(a(), b(), c())

a.set(2) # prints (2, 3, 5)
```

## cell magic

we also provide a ipython cell magic `%%effect`, which offers a convenient way
re-execute cells that use signals.

`In[1]:`

```python
%load_ext signals
from signals import Signal

a = Signal(0)
b = Signal(2)
```

`In[2]:`

```python
%%effect
a() + b() # re-evaluates the cell whenever a or b changes
```

`In[3]:`

```python
a.set(1)
```

## what

`signals` is an implementation of transparent reactive programming (TRP) for
Python.

TRP is a declarative programming paradigm for expressing _relationships_ between
values that vary over time. These time-varying values are known as _signals_.
Whenever a signal changes, the system automatically updates all dependents.

Spreadsheets are the classic example of TRP: cells linked by formulas update
automatically when values change. The system discovers dependencies by observing
data access, dynamically constructing a dependency graph.

The key features of TRP include:

- **declarative**: the programmer specifies relationships between values
- **transparent**: the system (not the programmer) automatically tracks
  dependencies
- **efficient**: the system performs only the necessary computations to ensure
  relationships hold over time

## why

TL;DR - TRP is a natural fit for interactive computing but has so far lacked the
right interface in popular tools to go mainstream. You can read more of my
[unfinished thoughts](./notes.md) on this topic.

## development

this project uses [`uv`](https://github.com/astral-sh/uv) for development.

```sh
uv run ruff check  # lints code
uv run ruff format # formats code
uv run pytest      # run tests
```
agentfleet 0.1.4
A package for managing AI agents and chatrooms
Requires Python: >=3.6

# AgentFleet

A Python package for managing AI agents and chatrooms that work with LLM-based capabilities.

## Installation

```bash
pip install agentfleet
```

## Usage

```python
from agentfleet import Agent, Chatroom, create_chatroom

# Example: Create an agent
from langchain_openai import ChatOpenAI
llm = ChatOpenAI()
agent = Agent(name="Assistant", llm=llm, sys_prompt="You are a helpful assistant")

# Example: Set up a chatroom
chatroom = Chatroom(llm=llm, agents=[agent], current_agent=agent)
```

### Using Custom Tools

```python
from agentfleet import create_chatroom
from langchain_core.tools import tool

# Define your custom tool functions
@tool
def lookup_data(query: str) -> str:
    """Look up data from a database."""
    # Implementation...
    return f"Data for {query}"
@tool
def process_request(request_id: str) -> str:
    """Process a request with the given ID."""
    # Implementation...
    return f"Processed request {request_id}"

# Create a dictionary mapping tool names to functions
tool_dict = {
    'lookup_data': lookup_data,
    'process_request': process_request
}

# Create a chatroom with tool dictionary
chatroom_config = {
    "states": [...],
    "agents": [
        {
            "name": "support_agent",
            "sys_prompt": "You are a support agent...",
            "util_tools": ["lookup_data", "process_request"],
            "transfer_tools": []
        }
    ],
    "initial_agent": "support_agent"
}

chatroom = create_chatroom(chatroom_config, llm, tool_dict=tool_dict)
```

## Features

- Create AI agents with different capabilities
- Build chatrooms with multiple specialized agents
- Transfer conversation control between agents
- Maintain conversation state across interactions
- Pass custom tools to agents via tool dictionary

## License

MIT License

Copyright (c) 2025 Wei Zhou

## Contributing

Individual Contributor: Wei Zhou

We welcome contributions! Please review our contribution guidelines for details on our code of conduct, and the process for submitting pull requests.
open-cravat-multiuser 2.12.1
OpenCRAVAT Multiuser Addon
Requires Python: >=3.6

open-cravat-server enables OpenCRAVAT to support multiple users in its web server.

OpenCRAVAT is a python package that performs genomic variant interpretation including variant impact, annotation, and scoring.  It has a modular architecture with a wide variety of analysis modules that are developed both by the CRAVAT team and the broader variant analysis community. OpenCRAVAT is a product of the `Karchin Lab`_ at Johns Hopkins University in collaboration with `In Silico Solutions`_ with funding provided by the National Cancer Institute's `ITCR`_ program.

.. _Karchin Lab: http://karchinlab.org
.. _In Silico Solutions: http://insilico.us.com
.. _ITCR: https://itcr.cancer.gov

Please see: `OpenCRAVAT Docs`_ for installation instructions and software documentation for OpenCRAVAT.

.. _OpenCRAVAT Docs: https://github.com/KarchinLab/open-cravat/wiki
chatmux 0.1.5
Convert between common LLM chat schemas
Requires Python: >=3.10.14

# chatmux

Convert to and from common LLM chat schemas.

All implementations are built on pydantic base models to be network ready.

## Installation

```bash
pip install chatmux
```

## Usage

Fully OpenAI compatible pydantic models
```python
from chatmux.openai import UserMessage, TextContentPart, ImageContentPart, ImageUrl

# Example using Pydantic models (more robust):
user_message = UserMessage(
    role="user",
    content=[
        TextContentPart(type="text", text="Describe this image:"),
        ImageContentPart(
            type="image_url",
            image_url=ImageUrl(url="https://example.com/image.jpg")
        )
    ]
)
openai_messages = [user_message.model_dump(exclude_none=True)] # Convert model to dict
```

Conversion methods to and from other schemas
```python
from chatmux.convert import oai_to_qwen

qwen_messages = oai_to_qwen(openai_messages)
print(qwen_messages)
# Expected Output (structure based on oai_to_qwen):
# [
#     {
#         'role': 'user',
#         'content': [
#             {'type': 'text', 'text': 'Describe this image:'},
#             {'type': 'image', 'image': 'https://example.com/image.jpg'}
#         ]
#     }
# ]
```

### Supported Conversions (as implemented in `src/chatmux/convert.py`):

*   **OpenAI-like -> Unsloth**: Converts messages (potentially from JSONL), handling image URLs/base64, embedding PIL Images. (`oai_to_unsloth`)
*   **OpenAI-like -> Qwen**: Converts multimodal messages, keeping image URLs as strings but adjusting the content structure. (`oai_to_qwen`)

## Contributing

Please open an issue before submitting a PR.

## License

MIT