Skip to content

Troubleshooting Null Destination in "Migrating from MultiPromptChain": Issue with LangChain Code Implementation #27064

Closed Answered by 104-wonohfor
104-wonohfor asked this question in Q&A
Discussion options

You must be logged in to vote

This is my solution. I removed RouteQuery and modified route_system.

import os
import asyncio
import json
from typing import Literal
from typing_extensions import TypedDict
from langchain.globals import set_debug
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_openai import ChatOpenAI
from langgraph.graph import END, START, StateGraph
from langchain_core.runnables import RunnableConfig

set_debug(True)

llm = ChatOpenAI(
    model='Meta-Llama-3.1-405B-Instruct',
    base_url="https://api.sambanova.ai/v1",
    api_key=os.environ.get("SAMBANOVA_API_KEY"),
)

# Define the prompts we will route to
prompt_1 = ChatPr…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@dosubot
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by 104-wonohfor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant