-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(gemini-client): rename and update initialization doc
Renamed DarwinAnthropic to DarwinGemini and updated documentation for clarity on the Gemini API client initialization process.
- Loading branch information
Showing
2 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
23 changes: 0 additions & 23 deletions
23
...ient/gemini-client-darwin/src/appleMain/kotlin/com/tddworks/gemini/api/DarwinAnthropic.kt
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
...-client/gemini-client-darwin/src/appleMain/kotlin/com/tddworks/gemini/api/DarwinGemini.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.tddworks.gemini.api | ||
|
||
import com.tddworks.gemini.api.textGeneration.api.Gemini | ||
import com.tddworks.gemini.api.textGeneration.api.GeminiConfig | ||
import com.tddworks.gemini.di.initGemini | ||
|
||
/** | ||
* A singleton object that initializes the Gemini configuration with the specified API key and base URL. | ||
*/ | ||
object DarwinGemini { | ||
|
||
/** | ||
* Initializes the Gemini configuration with the specified API key and base URL. | ||
* | ||
* This function sets up the Gemini environment by creating a configuration using the provided | ||
* API key and base URL, then initializing Gemini with this configuration. | ||
* | ||
* @param apiKey A lambda function that returns the API key as a string. Defaults to returning "CONFIG_API_KEY". | ||
* @param baseUrl A lambda function that returns the base URL as a string. Defaults to returning `Gemini.BASE_URL`. | ||
* | ||
* @return The initialized Gemini configuration. | ||
*/ | ||
fun gemini( | ||
apiKey: () -> String = { "CONFIG_API_KEY" }, | ||
baseUrl: () -> String = { Gemini.BASE_URL }, | ||
) = initGemini(GeminiConfig(apiKey, baseUrl)) | ||
} |