Closed vumg-z closed 1 year ago
Hey We could set an limit for the time in between generated thoughts and states perhaps
Tried to re-write the solve() method without luck. I'm trying this tomorrow, any feedback could be of very use my friend.
def solve(self, x, k=None, T=None, b=None, vth=None, timeout=None, confidence_threshold=None, max_iterations=None, convergence_threshold=None, convergence_count=None, delay=None):
start_time = time.time()
file_name = f"logs/tree_of_thoughts_output_{self.search_algorithm}.json"
try:
if self.search_algorithm == 'BFS':
while timeout is None or time.time() - start_time < timeout:
result = self.tot_bfs(x, k, T, b)
if result:
self.save_tree_to_json(file_name)
return result
if delay is not None:
time.sleep(delay) # Here's where we add the delay
elif self.search_algorithm == 'DFS':
while timeout is None or time.time() - start_time < timeout:
result = self.tot_dfs(x, k, T, vth)
if result:
self.save_tree_to_json(file_name)
return result
if delay is not None:
time.sleep(delay) # And here as well
else:
raise ValueError("Invalid search algorithm. Choose 'BFS' or 'DFS'.")
except KeyboardInterrupt:
logger.error("Keyboard interrupt detected.")
except ValueError as e:
logger.error(f"Error: {e}")
finally:
logger.info("Saving the current tree and metrics.")
self.save_tree_to_json(file_name)
We could add in an time delay between every generated thought and state!
Looks good we'll debug and implement it
We could add in an time delay between every generated thought and state!
openai still works better https://openai.com/research/improving-mathematical-reasoning-with-process-supervision
Hi,
I'm just testing this algorithm and I just created a Open AI's free trial account. I've got this runtime error message:
"Rate limit reached for default-gpt-3.5-turbo in organization org-R9Srq5XHNmyYxqITd0OZfUGu on requests per min. Limit: 3 / min."