Skip to content

Commit cbf0c27

Browse files
committed
fix bugs
1 parent 7e46317 commit cbf0c27

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

convokit/convo_similarity/examples/scd_example.ipynb renamed to convokit/convo_similarity/examples/example.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
"outputs": [],
5656
"source": [
5757
"### Define your own formatter function for your data\n",
58-
"def format_friends_transcript_from_convokit(corpus, convo_id):\n",
59-
" convo = corpus.get_conversation(convo_id)\n",
58+
"def format_friends_transcript_from_convokit(convo):\n",
6059
" utt_lst = convo.get_utterance_ids()\n",
6160
" speaker_ids = {}\n",
6261
" transcript = \"\"\n",

convokit/convo_similarity/summary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def get_scd_summary(self, transcript: str) -> str:
201201
:return: SCD summary text
202202
"""
203203
query = self.SUMMARY_PROMPT_TEMPLATE.format(transcript=transcript)
204-
response = self.client.generate(query, model=self.model)
204+
response = self.client.generate(query)
205205
return response.text
206206

207207
def get_sop_from_summary(self, summary: str) -> dict:
@@ -215,7 +215,7 @@ def get_sop_from_summary(self, summary: str) -> dict:
215215
:raises Exception: If the response cannot be parsed as a dictionary
216216
"""
217217
query = self.BULLETPOINT_PROMPT_TEMPLATE + summary
218-
response = self.client.generate(query, model=self.model)
218+
response = self.client.generate(query)
219219

220220
parsed_text = response.text.strip()
221221

convokit/genai/gemini_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def __init__(
2626
google_cloud_location: str = None,
2727
use_vertex_ai: bool = True,
2828
):
29-
os.environ["GOOGLE_API_KEY"] = api_key
29+
if not use_vertex_ai:
30+
os.environ["GOOGLE_API_KEY"] = api_key
3031
if use_vertex_ai:
3132
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "true"
3233
if google_cloud_location:

0 commit comments

Comments
 (0)