File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,34 @@ retrieve the key from an auth-source entry under the `:host` key `api.google-gem
3737> The two variables ` google-gemini-key ` is the default values for sending requests!
3838> However, you can still overwrite the value by passing the keywords ` :key ` !
3939
40+ ## 🔰 The simplest example
41+
42+ Here is the simplest example that teaches you how to use this library.
43+ This is a function with a ` query ` and a callback function.
44+
45+ ``` elisp
46+ (google-gemini-content-generate "How are you?"
47+ (lambda (data)
48+ (message "%s" data)))
49+ ```
50+
51+ ## 📨 Sending Request
52+
53+ All arguments are exposed in the argument list, so you can send any request in any way you want.
54+
55+ For example, the request function ` google-gemini-content-generate ` accepts
56+ argument max-tokens. By seeing Google Gemini's references page:
57+
58+ > Max output tokens: Specifies the maximum number of tokens that can be generated
59+ > in the response. A token is approximately four characters. 100 tokens correspond
60+ > to roughly 60-80 words.
61+
62+ ``` elisp
63+ (google-gemini-content-generate ...
64+ ...
65+ :max-output-tokens 100) ; Get roughly 60-80 words!
66+ ```
67+
4068## 🔗 References
4169
4270- [ llm] ( https://github.com/ahyatt/llm )
@@ -53,7 +81,6 @@ clone and make pull requests to this repository. Or you can
5381clone the project and establish your own branch of this tool.
5482Any methods are welcome!
5583
56-
5784### 🔬 Development
5885
5986To run the test locally, you will need the following tools:
You can’t perform that action at this time.
0 commit comments