Skip to content

Releases: hand-e-fr/OpenHosta

v1.1.0

27 Sep 11:30

Choose a tag to compare

OpenHosta v1.1.0 - 09/27/2024

This release introduces significant new features, enhancements, optimizations, and bug fixes to improve the functionality and performance of OpenHosta.

New Features

  • example Function: Adds examples for a specified hosta-injected function and caches them.
  • save_examples Function: Saves all examples of a hosta-injected function in a JSONL file.
  • load_examples Function: Loads an example file into a cache for a hosta-injected function.
  • set_prompt in PromptManager: Automatically changes a prompt in "prompt.json".
  • suggest function: Works the same as the __suggest__ attributs but in a function

Changes

  • suggest attribute: Fixed diagramm to diagram.

Enhancements

  • thought Function: Automatically guesses its return type with LLM.
  • suggest Function: Returns data from LLM in a dictionary.
  • emulate Function:
    • Now works for class methods.
    • Integrates local variables of the emulated function into the LLM prompt.
    • Includes a verification output to check and convert the output to the specified type if necessary. Supported types include Pydantic models, types from the typing module (List, Dict, Tuple, etc.), and built-in types (dict, int, float, etc.).
    • Added _last_request attribute to access the prompt sent to the LLM and _last_response to acces the raw message received.
  • Support for Typing Module: Allows specific return types from the typing module, including List, Dict, Tuple, Set, FrozenSet, Deque, Iterable, Sequence, Mapping, Union, Optional, Literal.
  • Return Type Prediction: The return type predicted by thought is now attached as an attribute (_return_type).

Optimizations

  • emulate Prompt: Removed confidence level, resulting in ~20% speed improvement.
  • Enhanced Prompts: Added code blocks, separators, and references to the processed function name for emulate, enhance, thought, and estimate.

Bug Fixes

  • emulate Function:
    • Now decorator-resistant and works in nested functions.
    • now works when emulated function is called inside another one
    • works now with lru_cache decorator from functools module
  • config.set_default_model: Works correctly with config.set_default_apiKey.
  • thought Function: Now accepts multiple arguments.
  • suggest and analytics Functions: Now call LLM with Model class (ai_call).
  • Flask Compatibility: Added compatibility with Flask.
  • Added a loop to find the frame in _extend_scope

Internal Improvements

  • Functional Tests: Added for each library feature.
  • Custom Exception Classes: Added for request and frame errors.
  • Makefile: Added for cleaning, packaging, and testing.
  • GitHub Workflows: Added for linting, formatting, and testing on push to dev and main branches.

Documentation

  • Google Cobal Link: Integrated into the documentation.
  • Inconsistencies and Errors: Corrected various documentation issues.

Performance Metrics

  • emulate Function: Execution time decreased by ~20% despite a slight performance drop since version v1.0.2.
  • thought Function: Execution time increased significantly due to the type prediction system, resulting in a double LLM call.
  • Caching System: No impact on the execution time of OpenHosta functions.

Instructions for Update

To update to this version, use the following command:

pip install --upgrade OpenHosta

Remember to delete __hostacache__ folders to avoid version conflicts.

Acknowledgements

Thank you to all contributors for your valuable feedback and contributions: @ramosleandre, @MerlinDEVILLARD, @WilliamJlvt, and @battmanux.


v1.1-rc4

27 Sep 07:30
a944382

Choose a tag to compare

v1.1-rc4 Pre-release
Pre-release

v1.1-rc4

  • Feature

    • Added suggest function. Works the same as the __suggest__ attributs but in a function
  • Doc

    • Many inconsistencies and errors corrected.
  • Internal

    • Added Github workflows for linting, formating and testing when pushing to dev and main
  • Fixes

    • suggest attribute diagramm is now diagram

What's Changed

Full Changelog: v1.1-rc3...v1.1-rc4

v1.2-beta2

26 Sep 09:38

Choose a tag to compare

v1.2-beta2 Pre-release
Pre-release

v1.2beta2

  • Features

    • predict function that create a linear regression model based on provided examples
  • Fixes

    • load_examples support now jsonl and csv
  • Enhancements

    • __hostacache__ now include links for datasets
    • mergenow merge with 1.1-rc3

What's Changed

v1.2-beta1

26 Sep 08:30

Choose a tag to compare

v1.2-beta1 Pre-release
Pre-release

v1.2beta1

  • Features

    • predict function that create a linear regression model based on provided examples
  • Fixes

    • load_examples support now jsonl and csv
  • Enhancements

    • __hostacache__ now include links for datasets

v1.1-rc3

26 Sep 07:28
d265353

Choose a tag to compare

v1.1-rc3 Pre-release
Pre-release

v1.1rc3

  • Fixes

    • emulate now works when emulated function is called inside another one
    • emulate works now with lru_cache decorator from functools module
  • Internal

    • Added custom Exception classes for request and frame errors.
    • Added a loop to find the frame in _extend_scope
    • Added a Makefile for cleaning and packaging and tests

What's Changed

Full Changelog: v1.1-rc2...v1.1-rc3

v1.1-rc2

12 Sep 16:56

Choose a tag to compare

v1.1-rc2 Pre-release
Pre-release

What's Changed

Full Changelog: v1.1-rc1...v1.1-rc2

v1.1-rc1

11 Sep 09:00
bb08c09

Choose a tag to compare

v1.1-rc1 Pre-release
Pre-release

v1.1

  • Fixes

    • the emulate function is now decorator-resistant.
    • The function config.set_default_model works now w/ config.set_default_apiKey
    • thought function now accept multiple arguments
    • suggest and analytics call now th LLM with Model class (ai_call)
    • emulate works now in a nested function.
  • Enhancement

    • the thought function guess automatically his return type with LLM
    • suggest return now his data returned by LLM in a dict
    • emulate works now for class methods
    • emulate now integrate locals variable of emulated function to the LLM prompt.
    • _hostacache_ are now available for function infos storage
    • Added support for the typing module: You can now use specific return types from the typing module, including [List, Dict, Tuple, Set, FrozenSet, Deque, Iterable, Sequence, Mapping, Union, Optional, Literal].
    • emulate now includes a verification output that checks and converts the output to the specified type if necessary. Supported types include Pydantic models, all types from the typing module mentioned above, as well as built-in types such as dict, int, float, str, list, set, frozenset, tuple, and bool.
      • The complex type is not supported. If you need to use complex numbers, please pass them as a tuple and manually convert them after processing.
    • The return type predicted by thought is now attached as an attribute to the object created: _return_type.
  • Features

    • example function that can add some example for a specified hosta-injected function (inside or outside it) and add it to the cache
    • save_examples function that can save in a JSONL file all he example of an hosta-injected function
    • load_examples function that can load an example file an a cache for an hosta-injected function
    • set_prompt in PromptManager enables to change automatically a prompt un "prompt.json"
  • Optimization

    • emulate prompt changed: confidence level removed: (~20% speed gained) (emulate: v1.1)
    • All prompt enhanced: added code block, separator and reference to the name of the processed function (emulate: v1.2, enhance v1.2, thought: v1.1, estimate: v1.1)
  • Internal

    • Functional tests have been added for each of the library's features

What's Changed

New Contributors

Full Changelog: v1.0...v1.1-rc1

v1.0

01 Sep 14:56

Choose a tag to compare

29/08/2024 - v1.0 release

v1.0_rc1

10 Jul 06:50

Choose a tag to compare

v1.0_rc1 Pre-release
Pre-release
[ADD] aditionnal files and release note