BaşlayınÜcretsiz Başlayın

Visualize the graph and return tool outputs

Your chatbot's graph is ready! First, you'll visualize the graph diagram to ensure that it's been correctly set up. Then, you'll build a function that allows you to run the chatbot as an application, passing in a question as a string and then obtaining the response. If the LLM alone is insufficient, the chatbot can access Wikipedia using the API tool to respond.

The graph has already been compiled for you.

graph = graph_builder.compile()

Bu egzersiz

Designing Agentic Systems with LangChain

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Produce the chatbot graph
try:
    ____(____(graph.____().____()))

except Exception:
    print("Plot generation failed... falling back to cached asset.")
    display_fallback()
Kodu Düzenle ve Çalıştır