MKE0108 commited on
Commit
0e5a120
·
verified ·
1 Parent(s): 3b004b6

Update bot_main.py

Browse files
Files changed (1) hide show
  1. 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-1.5-flash")
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