In this chapter, we are going to see how the new long chain expression language works with arguments
in the in the chain, in the chains.
So a we are going to see a way a to stop the response of the language model A using the argument stop
and the bind expression A in order to a stop the response when we find the second line.
So in the first part of this exercise we have created a chain in in the classic way using the language
model, the prompt and the and the string output parser.
And we are asking in the language model to tell us the name of three players who won the soccer World
Cup of one particular year.
The user input is the year 2010, and the answer is the three players who won the Soccer World Cup of
2010 are.
And then we have a new line Iker Casillas, new line Hernandez, new line Andrés Iniesta.
So with using this argument here, we are able to stop the language model response after the second
line.
So the response now will be with the same user input.
The three players who won the Soccer World Cup in the 2010 year are Iker Casillas.
And that's it.
So we don't have the Xavi Hernandez and Andrés Iniesta included.
So it's an interesting way using bind.
Interesting way to enter arguments here in the new line chain expression language way.
Remember you have more information, details and examples of this new approach in the Lang Chain documentation.