Spaces:
Sleeping
Sleeping
Update functions.py
Browse files- functions.py +2 -2
functions.py
CHANGED
|
@@ -174,7 +174,7 @@ def chat_complete(message, model="gpt-3.5-turbo-0125"):
|
|
| 174 |
{"role": "user", "content": str(message)}
|
| 175 |
]
|
| 176 |
)
|
| 177 |
-
return response
|
| 178 |
|
| 179 |
def openai_get_AI_summary(commit_info):
|
| 180 |
prompt_prefix = "Summarize this git commit given the following context in JSON:\n"
|
|
@@ -185,7 +185,7 @@ def openai_get_AI_summary(commit_info):
|
|
| 185 |
|
| 186 |
# Fetch the summary from OpenAI
|
| 187 |
response = chat_complete(message)
|
| 188 |
-
return response
|
| 189 |
|
| 190 |
def process_commits_with_openai_summaries(commits):
|
| 191 |
summaries = []
|
|
|
|
| 174 |
{"role": "user", "content": str(message)}
|
| 175 |
]
|
| 176 |
)
|
| 177 |
+
return response.choices[0].message['content'] if response.choices else "response not available"
|
| 178 |
|
| 179 |
def openai_get_AI_summary(commit_info):
|
| 180 |
prompt_prefix = "Summarize this git commit given the following context in JSON:\n"
|
|
|
|
| 185 |
|
| 186 |
# Fetch the summary from OpenAI
|
| 187 |
response = chat_complete(message)
|
| 188 |
+
return response
|
| 189 |
|
| 190 |
def process_commits_with_openai_summaries(commits):
|
| 191 |
summaries = []
|