How do I use langchains retry and output-fixing parser with the json parser?
How to use a token request in langchain retriever
I want to retrieve data from a database via a request call from as_retriever
. In order to use all data from the database I have to authenticate.
In order to do that I have to first request a token with username and password and then use this token in the POST request.
How could I do that in langchain
?
KeyError in SimpleSequentialChain
llm are created using WatsonxLLM class.
I’m getting error for the below code:
in validate_chains
for chain in values[“chains”]:
KeyError: ‘chains’
Langchain output parser not working for more than 20 json key attributes
I have used structred output parser which can be called using langchain, but while giving response and parsing it more after 20 json attributes its not parsing any more. Giving output parser exception.
How to pass extra parameters to an LLM?
I want to pass some additional properties in the input object passed to the LLM model, beyond those produced by the ChatPromptTemplate. I need to call my LLM with a Json object, which in addition to the messages property needs some other properties. I could create a custom LLM but it seems the invoke method of an LLM expects a string parameter. Can I pass a serialized Json object which contains both messages (prompt) and my extra parameters?
Read a stream of a word (.doc) in Python
I’m trying to read a word (.doc) to create a CustomWordLoader for LangChain. I’m currently able to read .docx files using the Python-docx package.
Loader.load() wont store the data in the variable..or it says variable not found?
loader = DirectoryLoader(“C:/Users/anith/News Art/”, glob = “**/*.txt”, loader_cls=TextLoader)
document=loader.load()
Accessing LangChain LCEL variables from prior steps in the chain
I’m trying to hop onto the LCEL and Langserve train but I’m having a little trouble understanding a bit of the “magic” involved with storing variables set in the pipeline’s dictionary.