Spaces:
Paused
Paused
Update bot_main.py
Browse files- bot_main.py +10 -12
bot_main.py
CHANGED
|
@@ -104,8 +104,6 @@ async def join(ctx):
|
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
-
|
| 108 |
-
|
| 109 |
import google.generativeai as genai
|
| 110 |
import os
|
| 111 |
genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
|
@@ -137,15 +135,15 @@ import asyncio
|
|
| 137 |
|
| 138 |
def generate_content1(topic):
|
| 139 |
base = [
|
| 140 |
-
"
|
| 141 |
-
"
|
| 142 |
-
"
|
| 143 |
-
"
|
| 144 |
-
"
|
| 145 |
-
"
|
| 146 |
-
"
|
| 147 |
-
"
|
| 148 |
-
"
|
| 149 |
]
|
| 150 |
|
| 151 |
base = random.sample(base, 1)
|
|
@@ -158,7 +156,7 @@ def generate_content1(topic):
|
|
| 158 |
給我一個句子就好
|
| 159 |
"""
|
| 160 |
try:
|
| 161 |
-
model = genai.GenerativeModel("gemini-
|
| 162 |
response = model.generate_content(prompt)
|
| 163 |
|
| 164 |
# Assuming response.candidates is iterable and contains a 'content' attribute
|
|
|
|
| 104 |
|
| 105 |
|
| 106 |
|
|
|
|
|
|
|
| 107 |
import google.generativeai as genai
|
| 108 |
import os
|
| 109 |
genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
|
|
|
|
| 135 |
|
| 136 |
def generate_content1(topic):
|
| 137 |
base = [
|
| 138 |
+
"我從不覺得在玩樂團快樂過",
|
| 139 |
+
"一但加入了就再也回不去了",
|
| 140 |
+
"你們滿腦子只想著自己呢",
|
| 141 |
+
"還真是高高在上呢",
|
| 142 |
+
"為什麼要演奏春日影?",
|
| 143 |
+
"畢竟我們不過是群烏合之眾罷了",
|
| 144 |
+
"現在的我們只是一丘之貉",
|
| 145 |
+
"我看妳只是在逃避吧?",
|
| 146 |
+
"這樣還有什麼意義嗎?"
|
| 147 |
]
|
| 148 |
|
| 149 |
base = random.sample(base, 1)
|
|
|
|
| 156 |
給我一個句子就好
|
| 157 |
"""
|
| 158 |
try:
|
| 159 |
+
model = genai.GenerativeModel("gemini-2.0-flash")
|
| 160 |
response = model.generate_content(prompt)
|
| 161 |
|
| 162 |
# Assuming response.candidates is iterable and contains a 'content' attribute
|