You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,16 @@
1
1
# Introduction
2
-
Java library for Gemini API.
2
+
3
+
Java library for Gemini API.
3
4
See the documentation here: https://ai.google.dev/gemini-api
4
5
5
6
# Getting started
7
+
6
8
- Generate an API key: https://aistudio.google.com/app/apikey
7
9
8
10
# Usage
11
+
9
12
## Dependency
13
+
10
14
Add the `gemini-api` dependency. Maven example (replace ${gemini.version} with the latest version):
11
15
12
16
<dependency>
@@ -16,8 +20,11 @@ Add the `gemini-api` dependency. Maven example (replace ${gemini.version} with t
16
20
</dependency>
17
21
18
22
## JsonParser
19
-
In order for this library to stay free of dependencies, the user must provide an implementation of the `swiss.ameri.gemini.spi.JsonParser` interface.
20
-
Alternatively, an example Gson implementation can be used with the following dependency (which includes a Gson dependency)
23
+
24
+
In order for this library to stay free of dependencies, the user must provide an implementation of
25
+
the `swiss.ameri.gemini.spi.JsonParser` interface.
26
+
Alternatively, an example Gson implementation can be used with the following dependency (which includes a Gson
27
+
dependency)
21
28
22
29
<dependency>
23
30
<groupId>swiss.ameri</groupId>
@@ -27,7 +34,8 @@ Alternatively, an example Gson implementation can be used with the following dep
27
34
28
35
## Example code
29
36
30
-
See gemini-tester for some examples.
37
+
See [gemini-tester](https://github.com/michael-ameri/gemini-api/blob/1beta.0.1.0/gemini-tester/src/main/java/swiss/ameri/gemini/tester/GeminiTester.java)
38
+
for some examples.
31
39
32
40
JsonParser parser = new GsonJsonParser(); // or some custom implementation
33
41
String apiKey = ...;
@@ -58,17 +66,21 @@ See gemini-tester for some examples.
58
66
.forEach(System.out::println)
59
67
60
68
# Versioning
61
-
The library versioning follows the scheme:
69
+
70
+
The library versioning follows the scheme:
62
71
`<gemini-api-version>.<major>.<minor>.<patch>`
63
72
64
73
Example:
65
74
`1beta.0.0.1`
66
75
67
76
# Requirements
77
+
68
78
-\>= Java 17
69
79
70
80
# Modules
81
+
71
82
The project is composed of the following maven modules, which are deployed to maven central.
83
+
72
84
## gemini-api
73
85
74
86
<dependency>
@@ -87,7 +99,7 @@ Main module to be used. Must not contain any dependencies to other modules.
87
99
<version>${gemini.version}</version>
88
100
</dependency>
89
101
90
-
Provides an example implementation of the `swiss.ameri.gemini.spi.JsonParser` class using `Gson`.
102
+
Provides an example implementation of the `swiss.ameri.gemini.spi.JsonParser` class using `Gson`.
0 commit comments