Releases: hand-e-fr/OpenHosta
Releases · hand-e-fr/OpenHosta
v1.1.0
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
exampleFunction: Adds examples for a specified hosta-injected function and caches them.save_examplesFunction: Saves all examples of a hosta-injected function in a JSONL file.load_examplesFunction: Loads an example file into a cache for a hosta-injected function.set_promptinPromptManager: Automatically changes a prompt in "prompt.json".suggestfunction: Works the same as the__suggest__attributs but in a function
Changes
suggestattribute: Fixeddiagrammtodiagram.
Enhancements
thoughtFunction: Automatically guesses its return type with LLM.suggestFunction: Returns data from LLM in a dictionary.emulateFunction:- 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_requestattribute to access the prompt sent to the LLM and_last_responseto 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
thoughtis now attached as an attribute (_return_type).
Optimizations
emulatePrompt: 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, andestimate.
Bug Fixes
emulateFunction:- Now decorator-resistant and works in nested functions.
- now works when emulated function is called inside another one
- works now with
lru_cachedecorator from functools module
config.set_default_model: Works correctly withconfig.set_default_apiKey.thoughtFunction: Now accepts multiple arguments.suggestandanalyticsFunctions: Now call LLM withModelclass (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
emulateFunction: Execution time decreased by ~20% despite a slight performance drop since version v1.0.2.thoughtFunction: 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 OpenHostaRemember 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
v1.1-rc4
-
Feature
- Added
suggestfunction. Works the same as the__suggest__attributs but in a function
- Added
-
Doc
- Many inconsistencies and errors corrected.
-
Internal
- Added Github workflows for linting, formating and testing when pushing to dev and main
-
Fixes
suggestattributediagrammis nowdiagram
What's Changed
- Fix/#111 @Merlin devillard by @MerlinDEVILLARD in #112
- Fix/#110 @Merlin devillard by @MerlinDEVILLARD in #118
- Dev by @MerlinDEVILLARD in #119
Full Changelog: v1.1-rc3...v1.1-rc4
v1.2-beta2
v1.2beta2
-
Features
predictfunction that create a linear regression model based on provided examples
-
Fixes
load_examplessupport now jsonl and csv
-
Enhancements
__hostacache__now include links for datasetsmergenow merge with 1.1-rc3
What's Changed
- Merge V1.1-rc3 to 1.2-beta1 by @ramosleandre in #109
v1.2-beta1
v1.2beta1
-
Features
predictfunction that create a linear regression model based on provided examples
-
Fixes
load_examplessupport now jsonl and csv
-
Enhancements
__hostacache__now include links for datasets
v1.1-rc3
v1.1rc3
-
Fixes
emulatenow works when emulated function is called inside another oneemulateworks now withlru_cachedecorator fromfunctoolsmodule
-
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
- Fix/#29 @Merlin devillard by @MerlinDEVILLARD in #99
- [ADD] bug by @MerlinDEVILLARD in #102
- [FIX] emulated called inside a func by @MerlinDEVILLARD in #103
- [FIX] bugs with lru_cache decorator by @MerlinDEVILLARD in #104
- [FIX] pre fix by @MerlinDEVILLARD in #106
- Dev by @MerlinDEVILLARD in #108
Full Changelog: v1.1-rc2...v1.1-rc3
v1.1-rc2
What's Changed
- [FIX] hotfix by @MerlinDEVILLARD in #82
- Hotfix/v1.1rc1 @Merlin devillard by @MerlinDEVILLARD in #87
- [ADD] doc warning & emulate attributs by @MerlinDEVILLARD in #88
- Dev by @MerlinDEVILLARD in #89
Full Changelog: v1.1-rc1...v1.1-rc2
v1.1-rc1
v1.1
-
Fixes
- the
emulatefunction is now decorator-resistant. - The function
config.set_default_modelworks now w/config.set_default_apiKey thoughtfunction now accept multiple argumentssuggestandanalyticscall now th LLM withModelclass (ai_call)emulateworks now in a nested function.
- the
-
Enhancement
- the
thoughtfunction guess automatically his return type with LLM suggestreturn now his data returned by LLM in a dictemulateworks now for class methodsemulatenow 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].
emulatenow 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 asdict,int,float,str,list,set,frozenset,tuple, andbool.- The
complextype is not supported. If you need to use complex numbers, please pass them as atupleand manually convert them after processing.
- The
- The return type predicted by
thoughtis now attached as an attribute to the object created:_return_type.
- the
-
Features
examplefunction that can add some example for a specified hosta-injected function (inside or outside it) and add it to the cachesave_examplesfunction that can save in a JSONL file all he example of an hosta-injected functionload_examplesfunction that can load an example file an a cache for an hosta-injected functionset_promptinPromptManagerenables to change automatically a prompt un "prompt.json"
-
Optimization
emulateprompt 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,enhancev1.2,thought: v1.1,estimate: v1.1)
-
Internal
- Functional tests have been added for each of the library's features
What's Changed
- Fix/#40 @Merlin devillard by @MerlinDEVILLARD in #43
- Fix/#42 @Merlin devillard by @MerlinDEVILLARD in #44
- [ADD] cache gestion with hosta_injected function by @ramosleandre in #46
- Merge dev to #39 to implement cache for example by @ramosleandre in #47
- Feature/#45 @Merlin devillard by @MerlinDEVILLARD in #48
- Update README.md example by @MerlinDEVILLARD in #50
- Fix/#30 @Merlin devillard by @MerlinDEVILLARD in #52
- Fix/#35 @Merlin devillard by @MerlinDEVILLARD in #55
- Doc/#23 @Merlin devillard by @MerlinDEVILLARD in #56
- [ADD] Class Method compatibility & Locals variable handler. Closes #17 by @MerlinDEVILLARD in #58
- Features/#39 @ramosleandre by @ramosleandre in #60
- Internal/#20 @Merlin devillard by @MerlinDEVILLARD in #65
- [ADD] fixed prompt & test thought. Closes #25 by @MerlinDEVILLARD in #67
- Fix/#13 @ramosleandre to dev by @ramosleandre in #68
- [FIX] thought user prompt by @MerlinDEVILLARD in #71
- [ADD] PMAC.md & doc legal framework by @MerlinDEVILLARD in #72
- [ADD] inherits class config & rename handler func by @MerlinDEVILLARD in #74
- [ADD] all doc w/ example func by @MerlinDEVILLARD in #76
- [ADD] update google colabù by @MerlinDEVILLARD in #79
- [ADD] docs for example by @MerlinDEVILLARD in #80
- Dev by @MerlinDEVILLARD in #81
New Contributors
- @ramosleandre made their first contribution in #46
Full Changelog: v1.0...v1.1-rc1
v1.0
29/08/2024 - v1.0 release
v1.0_rc1
[ADD] aditionnal files and release note