AI Agents Fundamentals - Lab: LangChain | Bug

Task 7: Launch Your LangChain AI Assistant

issue with app.py file.
Unable to communicate to port: 7860

Error:

root@controlplane ~/langchain-chatbot via :snake: v3.12.3 (venv) ➜ python app.py
modules.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 349/349 [00:00<00:00, 4.56MB/s]
config_sentence_transformers.json: 100%|████████████████████████████████████████████████████████████████████████████████| 116/116 [00:00<00:00, 1.67MB/s]
README.md: 10.5kB [00:00, 62.4MB/s]
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
sentence_bert_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████| 53.0/53.0 [00:00<00:00, 743kB/s]
config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 612/612 [00:00<00:00, 6.19MB/s]
model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 90.9M/90.9M [00:01<00:00, 64.2MB/s]
Loading weights: 100%|██████████████████████████████████████████████████████| 103/103 [00:00<00:00, 5776.20it/s, Materializing param=pooler.dense.weight]
BertModel LOAD REPORT from: sentence-transformers/all-MiniLM-L6-v2
**Key | Status | | **
------------------------±-----------±-±
embeddings.position_ids | UNEXPECTED | |

Notes:

  • UNEXPECTED :can be ignored when loading from different task/architecture; not ok if you expect identical arch.
    tokenizer_config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 350/350 [00:00<00:00, 4.44MB/s]
    vocab.txt: 232kB [00:00, 100MB/s]
    tokenizer.json: 466kB [00:00, 180MB/s]
    special_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 112/112 [00:00<00:00, 1.91MB/s]
    config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 190/190 [00:00<00:00, 3.11MB/s]
    :arrows_counterclockwise: Generating comprehensive synthetic knowledge base…
    :white_check_mark: Generated 6 LangChain docs
    :white_check_mark: Generated 4 company docs
    :white_check_mark: Generated 3 technical docs
    :white_check_mark: Generated 15 Q&A test pairs
    :file_folder: All files saved to: /root/langchain-chatbot/data/knowledge_base
    :white_check_mark: Generated 14 documents with rich content
    :white_check_mark: Created new vector store at /root/chroma_db
    /root/langchain-chatbot/app.py:51: UserWarning: The parameters have been moved from the Blocks constructor to the launch() method in Gradio 6.0: theme. Please pass these parameters to launch() instead.
    with gr.Blocks(theme=gr.themes.Soft(), title=“LangChain Chatbot”) as demo:
    Traceback (most recent call last):
    File “/root/langchain-chatbot/app.py”, line 68, in
    chatbot = gr.Chatbot(
    ^^^^^^^^^^^
    File “/root/langchain-lab/venv/lib/python3.12/site-packages/gradio/component_meta.py”, line 194, in wrapper
    return fn(self, **kwargs)
    ^^^^^^^^^^^^^^^^^^
    TypeError: Chatbot.init() got an unexpected keyword argument ‘bubble_full_width’

OK, Task 7 (which is Q8) errors out for me as well. I’ll tell engineering to give this one a look.

Sorry for the delay. Just rechecked (engineering had a look); it’s working now for me to the end of the lab.