semvec/pypi-packages huggingface dataset:
asksage-client 1.0.5
Ask Sage Python Client API
Requires Python: >=3.7

# Ask Sage Python Client

This is the official Python client for the Ask Sage API. It allows you to interact with the Ask Sage service, providing a simple and pythonic way to make requests to the service.

Check Ask Sage API documentation here:

Ask Sage User API: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/user-api/1.0

Ask Sage Server API: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0

## Installation

You can install the Ask Sage Python client via pip:

pip install asksage-client

## Usage

First, import the client:

from asksage-client import AskSageClient

Then, instantiate the client:

client = AskSageClient('your_email_here', 'your_api_key_here')

Now, you can use the client to interact with the Ask Sage service. For example, to interact with the main endpoint:

response = client.query(message='Who is Nic Chaillan?')

print(response)


## Endpoints

The client provides methods for all the Ask Sage API endpoints:

- `add_dataset`
- `delete_dataset`
- `assign_dataset`
- `get_user_logs`
- `get_user_logins`
- `query`
- `query_with_file`
- `query_plugin`
- `follow_up_questions`
- `tokenizer`
- `get_personas`
- `get_datasets`
- `get_plugins`
- `count_monthly_tokens`
- `count_monthly_teach_tokens`
- `train`
- `file`

Each method corresponds to an endpoint of the Ask Sage API. The `content` parameter should be a dictionary containing the data you want to send in the request body.

## Error Handling

The client includes basic error handling. If a request fails, it will print an error message and return `None`.

## Contributing

Contributions are welcome! Please submit a pull request or create an issue to contribute to this project.

## License

See the LICENSE file for details.
oarepo-model-builder-polymorphic 1.0.2
Model builder plugin for oarepo-polymorphic

<!--
 Copyright (c) 2022 CESNET

 This software is released under the MIT License.
 https://opensource.org/licenses/MIT
-->

# Polymorphic model builder plugin

An [OARepo Model Builder](https://github.com/oarepo/oarepo-model-builder) plugin to generate
invenio sources for polymorphic models.

## Installation

```bash
pip install oarepo-model-builder-polymorphic
```

## Usage

### What is polymorphic model?

A polymorphic model is a dict that can be defined by multiple schemas.
Which schema is used depends on a value of a present field (that is shared
across all the schemas).

Polymorphic model can be used, for example, to express inheritance:

```yaml

extension1{}:
  disc: { type: keyword }
  a: { type: keyword }

extension2{}:
  disc: { type: keyword }
  b: { type: keyword }

record:
  properties:
    a:
      type: polymorphic
      discriminator: disc
      schemas:
        "1": { use: "/extension1" }
        "2": { use: "/extension2" }
```

The following are valid instances:

```yaml

a:
  disc: "1"
  a: "blah"
---
a:
  disc: "2"
  b: "blah"
```

Invalid instance:

```yaml
a:
  disc: "3"
  b: "blah"
---
a:
  disc: "1"
  a: "blah"
  b: "blah"
```

If the "disc" field contains value "1", first extension schema will be used,
if it contains value "2", second schema will be used. Any other value is not
valid.