Skip to content

Conversation

@branislav-burdiliak
Copy link
Collaborator

No description provided.

The code is just copy pasted from (now) legacy v1. Create assistant method is already being rewritten to v2 (i.e. it is not 100% v1).
Instead of files, a new concept of assistant tool's resources is used. TODO: model various response formats
EnumValue is shared among v1 and v2, although it is located in v1 at the moment. TODO: Rewrite implementation for v2
They have a slightly different model in response from request.
Thread messages are associated with attachments instead of files now. The tools in attachments support only code interpreter and file search. Thus, there cannot be a FunctionSpec.
Make JSON formats lazy implicit val-s to prevent initialization errors and allow for easier testing (some formats can be ??? and tests will still run if those are not needed).
Fix serialization in requests on several places by calling Json.toJson(_). Fix several Seq-like fields in responses to be nullable (according to spec), e.g. attachments -- in order to support decoding of sequences with a default value (Nil), utilize Jsonx library. Issue: createThreadMessage does not accept `attachments` field, even though it is described in API.
v2 API is kept in standard packages.
# Conflicts: #	openai-client/src/main/scala/io/cequence/openaiscala/JsonFormats.scala #	openai-client/src/main/scala/io/cequence/openaiscala/service/impl/OpenAIServiceImpl.scala #	openai-client/src/test/scala/io/cequence/openaiscala/JsonFormatsSpec.scala #	openai-core/src/main/scala/io/cequence/openaiscala/service/OpenAIService.scala
@branislav-burdiliak branislav-burdiliak marked this pull request as ready for review May 17, 2024 14:31
@peterbanda peterbanda merged commit abac59d into master May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants