H:\anaconda\envs\slidev\lib\site-packages\langchain\llms\openai.py:173: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: from langchain.chat_models import ChatOpenAI
warnings.warn(
H:\anaconda\envs\slidev\lib\site-packages\langchain\llms\openai.py:753: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: from langchain.chat_models import ChatOpenAI
warnings.warn(
127.0.0.1 - - [13/Dec/2023 10:04:59] "POST /generate_title HTTP/1.1" 500 -
Traceback (most recent call last):
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 707, in connect
sock = self.retry.call_with_retry(
File "H:\anaconda\envs\slidev\lib\site-packages\redis\retry.py", line 46, in call_with_retry
return do()
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 708, in
lambda: self._connect(), lambda error: self.disconnect(error)
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 1006, in _connect
raise err
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 994, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 2213, in call
return self.wsgi_app(environ, start_response)
File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 2193, in wsgi_app
response = self.handle_exception(e)
File "H:\anaconda\envs\slidev\lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function
return cors_after_request(app.make_response(f(*args, *kwargs)))
File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "H:\anaconda\envs\slidev\lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function
return cors_after_request(app.make_response(f(args, kwargs)))
File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(view_args)
File "H:\aifeng\data\PPT\Auto-PPT\application.py", line 70, in stream1
return Response(gen_title_v2.predict_title_v2(form, role, title, topic_num),
File "H:\aifeng\data\PPT\Auto-PPT\generation\gen_ppt_outline.py", line 37, in predict_title_v2
return self.GptChain.predict(text)
File "H:\aifeng\data\PPT\Auto-PPT\chain\gpt_memory.py", line 49, in predict
return self.llm_chain.predict(human_input=question)
File "H:\anaconda\envs\slidev\lib\site-packages\langchain\chains\llm.py", line 252, in predict
return self(kwargs, callbacks=callbacks)[self.output_key]
File "H:\anaconda\envs\slidev\lib\site-packages\langchain\chains\base.py", line 220, in call
inputs = self.prep_inputs(inputs)
File "H:\anaconda\envs\slidev\lib\site-packages\langchain\chains\base.py", line 372, in prep_inputs
external_context = self.memory.load_memory_variables(inputs)
File "H:\anaconda\envs\slidev\lib\site-packages\langchain\memory\buffer.py", line 39, in load_memory_variables
return {self.memory_key: self.buffer}
File "H:\anaconda\envs\slidev\lib\site-packages\langchain\memory\buffer.py", line 24, in buffer
self.chat_memory.messages,
File "H:\anaconda\envs\slidev\lib\site-packages\langchain\memory\chat_message_histories\redis.py", line 48, in messages
_items = self.redis_client.lrange(self.key, 0, -1)
File "H:\anaconda\envs\slidev\lib\site-packages\redis\commands\core.py", line 2741, in lrange
return self.execute_command("LRANGE", name, start, end)
File "H:\anaconda\envs\slidev\lib\site-packages\redis\client.py", line 1266, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 1461, in get_connection
connection.connect()
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 713, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 10061 connecting to 127.0.0.1:6379. 由于目标计算机积极拒绝,无法连接。.
H:\anaconda\envs\slidev\lib\site-packages\langchain\llms\openai.py:173: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use:
lambda: self._connect(), lambda error: self.disconnect(error)
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 1006, in _connect
raise err
File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 994, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
from langchain.chat_models import ChatOpenAI
warnings.warn( H:\anaconda\envs\slidev\lib\site-packages\langchain\llms\openai.py:753: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use:from langchain.chat_models import ChatOpenAI
warnings.warn( 127.0.0.1 - - [13/Dec/2023 10:04:59] "POST /generate_title HTTP/1.1" 500 - Traceback (most recent call last): File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 707, in connect sock = self.retry.call_with_retry( File "H:\anaconda\envs\slidev\lib\site-packages\redis\retry.py", line 46, in call_with_retry return do() File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 708, inDuring handling of the above exception, another exception occurred:
Traceback (most recent call last): File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 2213, in call return self.wsgi_app(environ, start_response) File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 2193, in wsgi_app response = self.handle_exception(e) File "H:\anaconda\envs\slidev\lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(*args, *kwargs))) File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) File "H:\anaconda\envs\slidev\lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(args, kwargs))) File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "H:\anaconda\envs\slidev\lib\site-packages\flask\app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) File "H:\aifeng\data\PPT\Auto-PPT\application.py", line 70, in stream1 return Response(gen_title_v2.predict_title_v2(form, role, title, topic_num), File "H:\aifeng\data\PPT\Auto-PPT\generation\gen_ppt_outline.py", line 37, in predict_title_v2 return self.GptChain.predict(text) File "H:\aifeng\data\PPT\Auto-PPT\chain\gpt_memory.py", line 49, in predict return self.llm_chain.predict(human_input=question) File "H:\anaconda\envs\slidev\lib\site-packages\langchain\chains\llm.py", line 252, in predict return self(kwargs, callbacks=callbacks)[self.output_key] File "H:\anaconda\envs\slidev\lib\site-packages\langchain\chains\base.py", line 220, in call inputs = self.prep_inputs(inputs) File "H:\anaconda\envs\slidev\lib\site-packages\langchain\chains\base.py", line 372, in prep_inputs external_context = self.memory.load_memory_variables(inputs) File "H:\anaconda\envs\slidev\lib\site-packages\langchain\memory\buffer.py", line 39, in load_memory_variables return {self.memory_key: self.buffer} File "H:\anaconda\envs\slidev\lib\site-packages\langchain\memory\buffer.py", line 24, in buffer self.chat_memory.messages, File "H:\anaconda\envs\slidev\lib\site-packages\langchain\memory\chat_message_histories\redis.py", line 48, in messages _items = self.redis_client.lrange(self.key, 0, -1) File "H:\anaconda\envs\slidev\lib\site-packages\redis\commands\core.py", line 2741, in lrange return self.execute_command("LRANGE", name, start, end) File "H:\anaconda\envs\slidev\lib\site-packages\redis\client.py", line 1266, in execute_command conn = self.connection or pool.get_connection(command_name, **options) File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 1461, in get_connection connection.connect() File "H:\anaconda\envs\slidev\lib\site-packages\redis\connection.py", line 713, in connect raise ConnectionError(self._error_message(e)) redis.exceptions.ConnectionError: Error 10061 connecting to 127.0.0.1:6379. 由于目标计算机积极拒绝,无法连接。.