Compare commits
No commits in common. "b2aae15c79ab02fc8a433f51e5d2a58e3f9cb1a8" and "0cf4a0a76373f51303df55a4a28a66dc366ac972" have entirely different histories.
b2aae15c79
...
0cf4a0a763
3 changed files with 5 additions and 7 deletions
6
.github/workflows/bld.yml
vendored
6
.github/workflows/bld.yml
vendored
|
@ -1,6 +1,6 @@
|
|||
name: bld-ci
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
on: [ push, pull_request, workflow_dispatch ]
|
||||
|
||||
jobs:
|
||||
build-bld-project:
|
||||
|
@ -11,7 +11,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [17, 21, 22]
|
||||
java-version: [ 17, 20 ]
|
||||
|
||||
steps:
|
||||
- name: Checkout source repository
|
||||
|
@ -22,7 +22,7 @@ jobs:
|
|||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: "zulu"
|
||||
distribution: 'zulu'
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
||||
- name: Grant bld execute permission
|
||||
|
|
|
@ -87,7 +87,7 @@ public class MobibotBuild extends Project {
|
|||
// Google
|
||||
.include(dependency("com.google.code.gson", "gson", "2.10.1"))
|
||||
.include(dependency("com.google.guava", "guava", "33.1.0-jre"))
|
||||
.include(dependency("com.google.cloud", "google-cloud-vertexai", version(0, 7, 0)))
|
||||
.include(dependency("com.google.cloud", "google-cloud-vertexai", version(0, 6, 0)))
|
||||
// Kotlin
|
||||
.include(dependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.8.0"))
|
||||
.include(dependency("org.jetbrains.kotlinx", "kotlinx-cli-jvm", "0.3.6"))
|
||||
|
|
|
@ -109,9 +109,7 @@ class Gemini : AbstractModule() {
|
|||
try {
|
||||
VertexAI(projectId, location).use { vertexAI ->
|
||||
val generationConfig = GenerationConfig.newBuilder().setMaxOutputTokens(maxToken).build()
|
||||
val model = GenerativeModel.Builder().setModelName("gemini-pro-vision")
|
||||
.setGenerationConfig(generationConfig)
|
||||
.setVertexAi(vertexAI).build()
|
||||
val model = GenerativeModel("gemini-pro-vision", generationConfig, vertexAI)
|
||||
val session = ChatSession(model)
|
||||
val response = session.sendMessage(query)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue