Skip to content

Releases: mzattera/predictive-powers

Release 0.5.0

04 Mar 13:46
Compare
Choose a tag to compare

This release features a major rework due to introduction of "Agents" which are able to interact with users over a conversation, including multi-media support and tools (function calls). Agents provide an abstraction over actual API used (chat or assistants) and tools (single or parallel function calls).

In addition, this release adds support for several new features and models in OpenAI.

  • Reworked hierarchy of CompletionService and ChatService; introduced AgentService to expand chat with tools (function calls).
  • Introduced ChatMessage as a multipart message that supports agents (files, tool calls, etc.). ChatMessage.role has been renamed to "author" with only USER and BOT as values; other OpenAI specific values have been moved into OpenAiAgentMessage. OpenAiChatMessage is translated transparently back and forth inside OpenAiChatService. OpenAiChatService now uses ChatMessage and ChatCompletion in its interface, to abstract over OpenAI API. OpenAiChatCompletion is no longer needed and has been removed; ChatCompletion API is backward compatible.
  • Tool, ToolCall, and ToolCallResult are now classes to support multipart ChatMessages. Corresponding OpenAI implementations have been renamed to OpenAITool and, OpenAIToolCall,: OpenAIToolCallResult is no longer needed and has been deleted.
  • Introduced Capability which is a grouping of tools working together to provide agents with skills. The library has been reworked to support this at an abstract level, allowing the creation of Agents who have capabilities, regardless the underlying services.
  • OpenAiChatMessage is now multi-part too, to support vision models.
  • Services now extend AutoCloseable.
  • Reworked all POJO for API calls so their Lombok annotations are aligned and they have a standardized set of constructors.
  • Interfaces using generics now use <? extends T> instead of <T> where appropriate.
  • Reworked Tokenizer so that now it returns exact token counts for OpenAI models and it is faster. Token calculation in various services has been adjusted to benefit from this new feature.
  • Added support for new OpenAI embeddings API (new models and embedding size parameter). OpenAiEmbeddingService now uses text-embedding-3-small by default.
  • Transcription of audio files (STT) in OpenAI now supports all output formats defined in the audio API endpoint.
  • Chat completions API now supports generating logprobs.
  • Support for reproducible outputs in chat completions API.
  • Updated OpenAiModelService following the decommissioning of several OpenAI models.
  • OpenAiCompletionService uses davinci-002 as default model. This service is now a legacy.
  • New fine tuning API implemented (/v1/fine_tuning/jobs), old decommissioned fine-tune API removed.
  • API clients now handle HTTP 504 error automatically as well.
  • Removed OpenAI edits API as it is no longer available.
  • New OpenAI models added as for 2024, Jan. 25th announcement.
  • Improvements & bug fixes.

Release 0.4.0

20 Dec 16:32
Compare
Choose a tag to compare

Until version 1.0 (at least) library API is subject to potentially incompatible changes, while the code gets more stable.
However, functionalities from older versions should always be available, with minor code adjustments.

  • Refactoring: Endpoint has been renamed AiEndpoint, new Endpoint interface is now just a marker.
  • Refactoring: LlmUtil is now ChunkUtil. Methods added to support chunking with moving window and overlapping text.
  • EmbeddingService now uses the above methods to embed text in a more flexible way.
  • Web Search: SearchEndpoint added. Created GoogleSearchService to provide online search capabilities.
  • Added Text to Speech OpenAI API.
  • Added support for multiple function calls (tools) in OpenAI chat completion API.
  • OpenAI image service now supports DALL-E 3 and uses it by default.
  • OpenAiChatService uses GPT-4 8k by default.
  • Fixed broken OpenAI audio API (whisper-1 model).
  • Added new categories for OpenAI moderation API.
  • Added "slot filling" capabilities to CompletionService and ChatService.
  • Robustness: Added automatic "throttling" when API call rate limit is exceeded (automatic handling of HTTP errors 429, 500 & 503).
  • Robustness: Added automatic adjustment of completion size for OpenAI completion services when context size is exceeded.
  • Added extensive example (EssayWriter).
  • Bug fixes.

Release 0.3.0

26 Jun 09:59
Compare
Choose a tag to compare

Until version 1.0 (at least) library API is subject to potentially incompatible changes, while the code gets more stable.
However, functionalities from older versions should always be available, with minor code adjustments.

  • Added support for function calling in chat completion OpenAI API.
  • OpenAI services now use gpt-3.5-turbo-0613 by default.
  • Created ModelService to expose tokenizers, together with other model data.
  • Added proper GPT-2/3/4 tokenizers from jtokkit.
  • Automated lazy download of Hugging Face tokenizers.
  • Added ChatService for Hugging Face.
  • HuggingFaceCompletionService now uses gpt2-large by default.
  • Added logging using logback.
  • Better few-shot prompts.
  • Refactoring, more unit tests, and better JavaDoc.

Release 0.2.0

31 May 08:12
Compare
Choose a tag to compare
  • Added Hugging Face to show provider interchangeability.
  • Added image generation service.

Release 0.1.0

28 May 15:28
Compare
Choose a tag to compare

First version.

  • All OpenAi API functionalities through direct calls.
  • In-memory vector DB.
  • Extraction of text content from web pages files in many formats (PDF, MS Office, etc.).
  • First version of text services.