Spaces:
Sleeping
Sleeping
Commit
·
3ac9e34
1
Parent(s):
cbd8e0b
bugfix: fix minor bugs
Browse files
utils/completion_reward.py
CHANGED
@@ -28,11 +28,6 @@ SERVICE_ACCOUNT_INFO = os.getenv("GBQ_TOKEN")
|
|
28 |
SCOPES = ["https://www.googleapis.com/auth/cloud-platform"]
|
29 |
service_account_info_dict = json.loads(SERVICE_ACCOUNT_INFO)
|
30 |
|
31 |
-
aiplatform.init(
|
32 |
-
project='junyiacademy',
|
33 |
-
service_account=service_account_info_dict,
|
34 |
-
)
|
35 |
-
gemini_pro_model = GenerativeModel("gemini-pro")
|
36 |
creds = Credentials.from_service_account_info(service_account_info_dict, scopes=SCOPES)
|
37 |
|
38 |
gbq_client = bigquery.Client(
|
@@ -326,6 +321,11 @@ class AWSAgent:
|
|
326 |
|
327 |
class GoogleAgent:
|
328 |
def get_story(self, user_log):
|
|
|
|
|
|
|
|
|
|
|
329 |
system_prompt = """
|
330 |
我正在舉辦一個學習型的活動,參與活動的學生為 1-9 年級,我為他們設計了一個獨特的故事機制,每天每個學生都會收到屬於自己獨特的冒險紀錄,現在我需要你協助我將這些冒險紀錄,製作成一段冒險故事,請
|
331 |
- 以「你」稱呼學生
|
|
|
28 |
SCOPES = ["https://www.googleapis.com/auth/cloud-platform"]
|
29 |
service_account_info_dict = json.loads(SERVICE_ACCOUNT_INFO)
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
creds = Credentials.from_service_account_info(service_account_info_dict, scopes=SCOPES)
|
32 |
|
33 |
gbq_client = bigquery.Client(
|
|
|
321 |
|
322 |
class GoogleAgent:
|
323 |
def get_story(self, user_log):
|
324 |
+
aiplatform.init(
|
325 |
+
project='junyiacademy',
|
326 |
+
service_account=service_account_info_dict,
|
327 |
+
)
|
328 |
+
gemini_pro_model = GenerativeModel("gemini-pro")
|
329 |
system_prompt = """
|
330 |
我正在舉辦一個學習型的活動,參與活動的學生為 1-9 年級,我為他們設計了一個獨特的故事機制,每天每個學生都會收到屬於自己獨特的冒險紀錄,現在我需要你協助我將這些冒險紀錄,製作成一段冒險故事,請
|
331 |
- 以「你」稱呼學生
|