Skip to content

Release 0.5.0

Latest
Compare
Choose a tag to compare
@mzattera mzattera released this 04 Mar 13:46
· 25 commits to master since this release

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.