Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -108,11 +108,10 @@ def run_gpt(
|
|
108 |
safe_search=safe_search,
|
109 |
) + prompt_template.format(**prompt_kwargs)
|
110 |
if VERBOSE:
|
111 |
-
logging.info(LOG_PROMPT.format(content)) # Log the prompt
|
112 |
-
|
113 |
-
resp = client.text_generation(content, max_new_tokens=max_tokens, stop_sequences=stop_tokens, temperature=0.7, top_p=0.8, repetition_penalty=1.5)
|
114 |
if VERBOSE:
|
115 |
-
logging.info(LOG_RESPONSE.format(resp)) # Log the response
|
116 |
return resp
|
117 |
|
118 |
def generate(
|
@@ -163,8 +162,6 @@ def generate(
|
|
163 |
if VERBOSE:
|
164 |
logging.info(f"RESPONSE: {resp}") # Log the response directly
|
165 |
|
166 |
-
return resp # Return the full response at the end
|
167 |
-
|
168 |
def compress_history(purpose, task, history, directory):
|
169 |
resp = run_gpt(
|
170 |
COMPRESS_HISTORY_PROMPT,
|
|
|
108 |
safe_search=safe_search,
|
109 |
) + prompt_template.format(**prompt_kwargs)
|
110 |
if VERBOSE:
|
111 |
+
logging.info(LOG_PROMPT.format(content)) # Log the prompt
|
112 |
+
resp = client.text_generation(content, max_new_tokens=max_new_tokens, stop_sequences=stop_tokens, temperature=0.7, top_p=0.8, repetition_penalty=1.5)
|
|
|
113 |
if VERBOSE:
|
114 |
+
logging.info(LOG_RESPONSE.format([resp])) # Log the response
|
115 |
return resp
|
116 |
|
117 |
def generate(
|
|
|
162 |
if VERBOSE:
|
163 |
logging.info(f"RESPONSE: {resp}") # Log the response directly
|
164 |
|
|
|
|
|
165 |
def compress_history(purpose, task, history, directory):
|
166 |
resp = run_gpt(
|
167 |
COMPRESS_HISTORY_PROMPT,
|