Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1106,7 +1106,8 @@ def summarize_chunks(api_name: str, api_key: str, transcript: List[dict], chunk_
|
|
| 1106 |
######### Token-size Chunking ######### FIXME - OpenAI only currently
|
| 1107 |
# This is dirty and shameful and terrible. It should be replaced with a proper implementation.
|
| 1108 |
# anyways lets get to it....
|
| 1109 |
-
|
|
|
|
| 1110 |
|
| 1111 |
|
| 1112 |
def get_chat_completion(messages, model='gpt-4-turbo'):
|
|
|
|
| 1106 |
######### Token-size Chunking ######### FIXME - OpenAI only currently
|
| 1107 |
# This is dirty and shameful and terrible. It should be replaced with a proper implementation.
|
| 1108 |
# anyways lets get to it....
|
| 1109 |
+
api_key = openai_api_key
|
| 1110 |
+
client = OpenAI(api_key)
|
| 1111 |
|
| 1112 |
|
| 1113 |
def get_chat_completion(messages, model='gpt-4-turbo'):
|