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