-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPT4All Java Bindings and supported models list #216
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/openai/OpenAIEmbeddings.kt
# Conflicts: # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/CoreAIScope.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/functions/CFunction.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/openai/models.kt # kotlin/src/commonMain/kotlin/com/xebia/functional/xef/auto/DeserializerLLMAgent.kt # kotlin/src/commonMain/kotlin/com/xebia/functional/xef/auto/serialization/functions/FunctionSchema.kt # scala/src/main/scala/com/xebia/functional/xef/scala/auto/package.scala
… and java depends on openai module for defaults. xef core does not depend on open ai
# Conflicts: # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/AI.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/AIRuntime.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/AiDsl.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/CoreAIScope.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/Message.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/Role.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/text/CompletionRequest.kt # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/CustomRuntime.kt # java/src/main/java/com/xebia/functional/xef/java/auto/AIScope.java # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/DeserializerLLMAgent.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/ImageGenerationAgent.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/MockAIClient.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIClient.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIEmbeddings.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIRuntime.kt # scala/src/main/scala/com/xebia/functional/xef/scala/auto/package.scala
… local models. Local models can be use in the AI DSL and interleaved with any model.
… block and manual component construction
@xebia-functional/team-ai |
diesalbla
reviewed
Jul 3, 2023
gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/Models.kt
Show resolved
Hide resolved
diesalbla
previously approved these changes
Jul 3, 2023
# Conflicts: # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/CoreAIScope.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/auto/PromptConfiguration.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/Chat.kt # core/src/commonMain/kotlin/com/xebia/functional/xef/llm/ChatWithFunctions.kt # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/gpt4all/Chat.kt # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/manual/NoAI.kt # gpt4all-kotlin/build.gradle.kts # gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/GPT4All.kt # gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/GPT4AllModel.kt # gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/HuggingFaceLocalEmbeddings.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/DeserializerLLMAgent.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIClient.kt # openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIEmbeddings.kt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #215
This PR introduces the official GPT4ALL Java bindings, which provide access to GPT4All functionality. With the introduction of these bindings, we no longer need to maintain the
llama.cpp
binaries. The changes in this PR remove references tollama.cpp
and replace them with the new GPT4ALL Java bindings.The key changes in this PR are as follows:
Gpt4AllModel
class, which represents a GPT4All model and provides methods to fetch supported models from a JSON file.GPT4AllModel
interface, as it is no longer needed.LLModel
interface and its implementations (LlamaModel
andGPTJModel
), as they are no longer used.GPT4All
interface to use the new GPT4ALL Java bindings.GPT4All.invoke()
function to load the GPT4All model using the new bindings.createCompletion()
andcreateChatCompletion()
functions in theGPT4All
interface to use the new GPT4ALL Java bindings for generating completions.main()
function in theChat.kt
example to use the new GPT4ALL Java bindings and theGpt4AllModel.supportedModels()
function to display the supported models.llama.cpp
and related binaries from the codebase.