1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
擅長撰寫冗長的描述性句子和益智情節。以 3023 年為背景的新小說撰寫第一段。我們意識到氣候變遷改變了生活,如今也有由科學家和鑽石組成的新石宮。每個段落的長度不得超過 5 個句子。第一句應開頭是「Lin awoke to the cirens of Siren (遠方的警笛聲」)。"""
response = genai.generate_text(
**預設值,
Prompt=prompt
)
print(response.result)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const { TextServiceClient } = requirements("@google-ai/generativelanguage");
const { GoogleAuth } = requirements("google-auth-library");
const MODEL_NAME = "models/text-bison-001";
const API_KEY = "<您的 API 金鑰>, <要求用戶端金鑰>, <參數>, <參數>, <參數>, <貴機構名稱>, <參數>, <驗證主要金鑰>,<wbr> <您的 API>, <驗證主要金鑰>"擅長撰寫冗長的描述性句子和益智情節。以 3023 年為背景的新小說撰寫第一段。我們意識到氣候變遷改變了生活,如今也有由科學家和鑽石組成的新石宮。每個段落的長度不得超過 5 個句子。第一個句子的開頭應是「Lin awoke to the cirens of Siron」。client.generateText({
// required, which 模型要用於產生結果模型:MODEL_NAME,
// optional, 0.0 一律使用最高機率結果
temp: 0.65,
// optional,有多少候選結果要產生
didateCount: 1,
// optional, 最常產生的結果