Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Conversational form closed at the beginning #806

Closed
rafleze opened this issue May 6, 2024 · 1 comment
Closed

[BUG] Conversational form closed at the beginning #806

rafleze opened this issue May 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rafleze
Copy link
Contributor

rafleze commented May 6, 2024

Working on this plugin, I'm trying to use conversational forms, but right from the first interaction, the form is closed.
The same error also occurs with the example given in the readme of the official repository.

Context

  • Cheshire Cat version = 1.6.1
  • Mac OS Sonoma 14.1.1 on Apple M1 Pro
  • Docker desktop 4.29.0
  • Compose v2.26.1
  • Kubernetes v1.29.2

Steps to reproduce the behavior:

  1. Install the plugin (the pizza challenge is enough)
  2. Interact with it
  3. The form is closed as you can se in the following image

Screenshot 2024-05-06 alle 10 17 36

Traceback
Here you can see the traceback

cheshire_cat_core  | 
cheshire_cat_core  | Cat REST API:   http://localhost:1865/docs
cheshire_cat_core  | Cat PUBLIC:     http://localhost:1865/public
cheshire_cat_core  | Cat ADMIN:      http://localhost:1865/admin
cheshire_cat_core  | 
cheshire_cat_core  | ======================================
cheshire_cat_core  | INFO:     Application startup complete.
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /admin/ HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /admin/assets/Rubik-Bold.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59115 - "GET /admin/assets/cat.js HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59119 - "GET /admin/assets/Rubik-Medium.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59116 - "GET /admin/assets/cat.css HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59118 - "GET /admin/assets/Rubik-BoldItalic.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /admin/assets/Rubik-MediumItalic.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59117 - "GET /admin/assets/Rubik-Italic.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59118 - "GET /admin/assets/Rubik-SemiBold.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59119 - "GET /admin/assets/Rubik-Regular.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /admin/assets/Rubik-SemiBoldItalic.ttf HTTP/1.1" 304 Not Modified
cheshire_cat_core  | DEBUG:    = connection is CONNECTING
cheshire_cat_core  | DEBUG:    < GET /ws/user HTTP/1.1
cheshire_cat_core  | DEBUG:    < host: localhost:1865
cheshire_cat_core  | DEBUG:    < connection: Upgrade
cheshire_cat_core  | DEBUG:    < pragma: no-cache
cheshire_cat_core  | DEBUG:    < cache-control: no-cache
cheshire_cat_core  | DEBUG:    < user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
cheshire_cat_core  | DEBUG:    < upgrade: websocket
cheshire_cat_core  | DEBUG:    < origin: http://localhost:1865
cheshire_cat_core  | DEBUG:    < sec-websocket-version: 13
cheshire_cat_core  | DEBUG:    < accept-encoding: gzip, deflate, br, zstd
cheshire_cat_core  | DEBUG:    < accept-language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
cheshire_cat_core  | DEBUG:    < cookie: csrftoken=WRlzFUgAFzVSgsHT9e458blTQht3GwfY; sessionid=3eyylvvxsek2ewiswlvndf0m2gpcqjuc; token=96c8526201a098df1850fc025f3e95b33a7b095a
cheshire_cat_core  | DEBUG:    < sec-websocket-key: zHR59Ur615nG9PsBWUta2g==
cheshire_cat_core  | DEBUG:    < sec-websocket-extensions: permessage-deflate; client_max_window_bits
cheshire_cat_core  | INFO:     ('192.168.65.1', 59120) - "WebSocket /ws/user" [accepted]
cheshire_cat_core  | DEBUG:    > HTTP/1.1 101 Switching Protocols
cheshire_cat_core  | DEBUG:    > Upgrade: websocket
cheshire_cat_core  | DEBUG:    > Connection: Upgrade
cheshire_cat_core  | DEBUG:    > Sec-WebSocket-Accept: Bu8rDoJCMrWjl4zmyW2W9KWdExQ=
cheshire_cat_core  | DEBUG:    > Sec-WebSocket-Extensions: permessage-deflate
cheshire_cat_core  | DEBUG:    > date: Mon, 06 May 2024 07:57:15 GMT
cheshire_cat_core  | DEBUG:    > server: uvicorn
cheshire_cat_core  | INFO:     connection open
cheshire_cat_core  | DEBUG:    = connection is OPEN
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /plugins HTTP/1.1" 307 Temporary Redirect
cheshire_cat_core  | INFO:     192.168.65.1:59116 - "GET /memory/collections HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59117 - "GET / HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59118 - "GET /plugins/settings HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /memory/conversation_history HTTP/1.1" 200 OK
cheshire_cat_core  | [2024-05-06 07:57:15.729] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::factory_allowed_embedders with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:15.730] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::factory_allowed_llms with priority 0"
cheshire_cat_core  | INFO:     192.168.65.1:59119 - "GET /llm/settings HTTP/1.1" 200 OK
cheshire_cat_core  | [2024-05-06 07:57:15.736] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::factory_allowed_embedders with priority 0"
cheshire_cat_core  | INFO:     192.168.65.1:59114 - "GET /plugins/ HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59117 - "GET /admin/favicon.ico HTTP/1.1" 200 OK
cheshire_cat_core  | INFO:     192.168.65.1:59115 - "GET /embedder/settings HTTP/1.1" 200 OK
cheshire_cat_core  | DEBUG:    < TEXT '{"text":"transcribe a video","user_id":"user"}' [46 bytes]
cheshire_cat_core  | [2024-05-06 07:57:21.933] INFO   cat.looking_glass.stray_cat.StrayCat.__call__::301 
cheshire_cat_core  | UserMessage(text='transcribe a video', user_id='user')
cheshire_cat_core  | [2024-05-06 07:57:21.933] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_cat_reads_message with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:21.934] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::cat_recall_query with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:21.934] INFO   cat.looking_glass.stray_cat.StrayCat.recall_relevant_memories_to_working_memory::188 
cheshire_cat_core  | "Recall query: 'transcribe a video'"
cheshire_cat_core  | [2024-05-06 07:57:22.202] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::244 
cheshire_cat_core  | "Executing core_plugin::before_cat_recalls_memories with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.203] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_cat_recalls_episodic_memories with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.204] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_cat_recalls_declarative_memories with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.205] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_cat_recalls_procedural_memories with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.206] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::244 
cheshire_cat_core  | "Executing core_plugin::after_cat_recalls_memories with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.208] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_agent_starts with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.208] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::agent_fast_reply with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.208] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::agent_prompt_prefix with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.209] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::agent_prompt_suffix with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.209] DEBUG  cat.looking_glass.agent_manager.AgentManager.execute_agent::209 
cheshire_cat_core  | "Procedural memories retrived: 3."
cheshire_cat_core  | [2024-05-06 07:57:22.210] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::agent_allowed_tools with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:22.210] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::agent_prompt_instructions with priority 0"
cheshire_cat_core  | /usr/local/lib/python3.10/site-packages/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The class `LLMSingleActionAgent` was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use Use new agent constructor methods like create_react_agent, create_json_agent, create_structured_chat_agent, etc. instead.
cheshire_cat_core  |   warn_deprecated(
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | > Entering new AgentExecutor chain...
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | > Entering new LLMChain chain...
cheshire_cat_core  | Prompt after formatting:
cheshire_cat_core  | Create a JSON action to complete the action sequence, with the correct "action" and "action_input" to help the Human.
cheshire_cat_core  | You can use one of these actions:
cheshire_cat_core  | 
cheshire_cat_core  | - "TranscriptionForm": Youtube video transcription
cheshire_cat_core  | - "final_answer": Use this action to finish or no relevant action is available. Input is always null.
cheshire_cat_core  | 
cheshire_cat_core  | ## To add an action, use only the following format:
cheshire_cat_core  | json
cheshire_cat_core  | {
cheshire_cat_core  |     "action": // str - The name of the action to take, should be one of ["TranscriptionForm", "final_answer"]
cheshire_cat_core  |     "action_input": // str or null - The input to the action
cheshire_cat_core  | }
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | ## Here some examples:
cheshire_cat_core  | 
cheshire_cat_core  | Question: transcribe a youtube video
cheshire_cat_core  | json
cheshire_cat_core  | {
cheshire_cat_core  |     "action": "TranscriptionForm",
cheshire_cat_core  |     "action_input": // Input of the action according to it's description
cheshire_cat_core  | }
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | ## Action output
cheshire_cat_core  | After each action there will be an action output in this format:
cheshire_cat_core  | json
cheshire_cat_core  | {
cheshire_cat_core  |     "action_output": // output of the preceding action
cheshire_cat_core  | }
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | ## Final answer / no action available
cheshire_cat_core  | When you have a final answer (or no tools are relevant), use the following format:
cheshire_cat_core  | json
cheshire_cat_core  | {
cheshire_cat_core  |     "action": "final_answer",
cheshire_cat_core  |     "action_input": null
cheshire_cat_core  | }
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | ## Conversation with Human:
cheshire_cat_core  | 
cheshire_cat_core  |  - Human: transcribe a video
cheshire_cat_core  | 
cheshire_cat_core  | ## Actions sequence used until now:
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | ## Next action:
cheshire_cat_core  | json
cheshire_cat_core  | 
cheshire_cat_core  | 
cheshire_cat_core  | > Finished chain.
cheshire_cat_core  | [2024-05-06 07:57:22.900] INFO   cat.looking_glass.output_parser.ChooseProcedureOutputParser.parse::15 
cheshire_cat_core  | "{\n    \"action\": \"TranscriptionForm\",\n    \"action_input\": \"Youtube video transcription\"\n}\n"
cheshire_cat_core  | {
cheshire_cat_core  |     "action": "TranscriptionForm",
cheshire_cat_core  |     "action_input": "Youtube video transcription"
cheshire_cat_core  | }
cheshire_cat_core  | 
cheshire_cat_core  | > Finished chain.
cheshire_cat_core  | /usr/local/lib/python3.10/site-packages/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The method `BaseLLM.__call__` was deprecated in langchain-core 0.1.7 and will be removed in 0.2.0. Use invoke instead.
cheshire_cat_core  |   warn_deprecated(
cheshire_cat_core  | [2024-05-06 07:57:23.855] INFO   cat.looking_glass.stray_cat.StrayCat.__call__::359 
cheshire_cat_core  | "cat_message:"
cheshire_cat_core  | [2024-05-06 07:57:23.855] INFO   cat.looking_glass.stray_cat.StrayCat.__call__::360 
cheshire_cat_core  | {
cheshire_cat_core  |     "output": "Form TranscriptionForm closed",
cheshire_cat_core  |     "return_direct": true
cheshire_cat_core  | }
cheshire_cat_core  | [2024-05-06 07:57:23.855] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_cat_stores_episodic_memory with priority 0"
cheshire_cat_core  | [2024-05-06 07:57:24.811] DEBUG  cat.mad_hatter.mad_hatter.MadHatter.execute_hook::265 
cheshire_cat_core  | "Executing core_plugin::before_cat_sends_message with priority 0"
cheshire_cat_core  | DEBUG:    > TEXT '{"content":"Form TranscriptionForm closed","use...0a705567eeabd18fb"}]}}}' [1464 bytes]
cheshire_cat_core  | DEBUG:    % sending keepalive ping
cheshire_cat_core  | DEBUG:    > PING e9 72 47 ab [binary, 4 bytes]
cheshire_cat_core  | DEBUG: 
@rafleze rafleze added the bug Something isn't working label May 6, 2024
@rafleze
Copy link
Contributor Author

rafleze commented May 7, 2024

On my mac it's not working yet even if the cat is 1.6.1 version.
Anyway I tryed to reproduce the issue on Ubuntu and it's working correctly.
I'll investigate if there is any problem on my mac, but If nobody has this bug this issue is resolved with the 1.6.1 version.

@pieroit pieroit closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants