Coder Social home page Coder Social logo

closedloop / typedllm Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 14 KB

TypedLLM helps developers efficiently transform unstructured text outputs from large language models into strongly typed dataclasses, like Pydantic, enabling seamless integration with applications and streamlined data handling for improved consistency and maintainability.

License: MIT License

Shell 19.37% Python 80.63%

typedllm's Introduction

TypedLLM: Large Language Model to Typed Dataclass Conversion

TypedLLM is a Python repository that streamlines the process of converting unstructured text outputs from large language models into strongly typed dataclasses, like Pydantic, facilitating seamless integration with applications and enhancing data handling for improved consistency and maintainability.

Table of Contents

Installation

To install TypedLLM, follow these steps:

  1. Pip install.

    pip install typedllm
    
  2. Clone the repository:

    git clone https://github.com/username/TypedLLM.git
    

    Change to the project directory:

    cd TypedLLM
    

    Install the required packages:

    pip install -r requirements.txt
    

Usage

To use TypedLLM, first import the necessary modules:

from typedllm import TypedLLM, PydanticConverter

Then, create an instance of the converter and process your text output:

converter = PydanticConverter()
typed_output = converter.convert(text_output)

For more detailed examples, please refer to the examples directory.

Configuration

No specific configuration is required to use TypedLLM. However, you can customize the behavior of the converter by extending the PydanticConverter class and overriding its methods, if needed.

API Documentation

Please refer to the API documentation for a complete list of available functions, classes, methods, and parameters.

Contributing

We welcome contributions to TypedLLM! To contribute, please follow these guidelines:

  1. Fork the repository and create your branch from the main branch.
  2. Make your changes, ensuring you follow the project's coding style and documentation standards.
  3. Submit a pull request with a clear description of your changes.

Development Environment

Set up a virtual environment:

python3 -m venv venv
source venv/bin/activate

# install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt

# install typedllm
pip install -e .

Testing

To run tests for TypedLLM, follow these steps:

Install the required testing packages:

pip install -r requirements-dev.txt

Run the tests:

pytest

License

TypedLLM is released under the MIT License.

Credits/Acknowledgements

We would like to thank the following libraries and resources that have been instrumental in the development of TypedLLM:

Changelog

Please refer to the CHANGELOG.md file for a summary of notable changes in each release of TypedLLM.

Contact Information

For any questions or suggestions, please reach out to the TypedLLM maintainers:

typedllm's People

Contributors

closedloop avatar

Watchers

 avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.