Тёмный
No video :(

LangChain Tutorial (Python) #3: Output Parsers (String, List, JSON) 

Leon van Zyl
Подписаться 22 тыс.
Просмотров 8 тыс.
50% 1

Опубликовано:

 

27 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@rrioclkls7721
@rrioclkls7721 5 месяцев назад
your videos have brought me back from the brink of insanity, thank you.
@leonvanzyl
@leonvanzyl 5 месяцев назад
You're welcome 🤗
@daltheman
@daltheman 3 месяца назад
As a tech teacher for over 20 years, I have to say that your teaching is excellent. You are beyond just being a programmer. Thank you and keep teaching us!
@leonvanzyl
@leonvanzyl 3 месяца назад
Wow, that is amazing feedback! Thank you!!
@ahassan7270
@ahassan7270 7 месяцев назад
You are wonderful man. You have EXTRAORDINARY way in delivering and explaining information. I really get great benefit from your channel. Thank you so much for your great efforts and sharing such important information.👏👏
@leonvanzyl
@leonvanzyl 7 месяцев назад
This comment truly motivates me. Thank you very much! Please press like on the video to help put this video in front of more people
@ahassan7270
@ahassan7270 7 месяцев назад
Already I did. Once again thank you so much for sharing this information.@@leonvanzyl
@lindseyfisher8021
@lindseyfisher8021 3 месяца назад
These videos are incredibly helpful! I've watched tons of tutorials and yours just make the concepts so clear and easy to follow! Subscribed and look forward to more
@leonvanzyl
@leonvanzyl 3 месяца назад
Thank you 🙏
@Matt-hp1cl
@Matt-hp1cl 4 месяца назад
Excellent tutorial, so clearly explained, thank you. I needed the JSON parser.
@leonvanzyl
@leonvanzyl 4 месяца назад
You're welcome
@user-kc7pn6ix9k
@user-kc7pn6ix9k Месяц назад
Best tutorial!
@leonvanzyl
@leonvanzyl Месяц назад
Thank you 😊
@ishandindorkar2846
@ishandindorkar2846 3 месяца назад
Thank you for creating this video. It helped me a lot.
@leonvanzyl
@leonvanzyl 3 месяца назад
You're welcome 🤗
@aravindk8188
@aravindk8188 4 месяца назад
You are simply genius.
@AssassinUK
@AssassinUK 7 месяцев назад
This and your previous video have been great! But I started following you based on your Flowise videos and now I use Flowise a lot for production work as well. Are you going to make a Flowise version of your videos based on these videos at all? Don't forget your Flowise followers 😉
@leonvanzyl
@leonvanzyl 7 месяцев назад
I have not forgotten about Flowise at all, don't worry. I am literally working on an updating Flowise tutorial series, as we speak. A lot has changed since that original series.
@rogerwmwong
@rogerwmwong 3 месяца назад
I am trying to follow your tutorial. When I am writing the statement "parser = JsonOutputPaser(pydantic_object=Person)", there is no "pydantic_object" although I can find "pydantic" and "pydantic_core", should I use "pydantic" instead?
@rogerwmwong
@rogerwmwong 3 месяца назад
I tried "parser = JsonOutputParser(pydantic=Person)" and it works! Thanks!
@leonvanzyl
@leonvanzyl 3 месяца назад
Thank you for sharing!
@fatiga2426
@fatiga2426 3 месяца назад
Hi, great video! I was wondering, would it be fine if we just got the string from the content of the AI Message Object instead of using a parser? I noticed everyone uses parsers for this but I'm not sure why yet. Thanks!
@alokbhatt84
@alokbhatt84 3 месяца назад
I am trying to extract 3rd field as address from my prompt apart from name and age. But I am not getting any output why? Is it because we can only output two fields from the json parser?
@leonvanzyl
@leonvanzyl 3 месяца назад
There is no limit to the amount of fields. Ensure that your system prompt as well as the output parser have the 3rd field in them.
@alokbhatt84
@alokbhatt84 3 месяца назад
@@leonvanzyl I am using this function def call_json_output_parser(): prompt = ChatPromptTemplate.from_messages([ ("system", "Extract information from following phrase. Formatting instruction: {format_instruction}"), ("human","{phrase}") ]) class Person(BaseModel): name: str = Field(description = "name of the person") age : int = Field(description = "age of the person") address: str = Field(description = "address of the person") parser = JsonOutputParser(pydantic_object=Person) chain = prompt | llm | parser return chain.invoke({ "phrase":"Max is thirty years old. He lives in 492, Kamal Market, Delhi. He studies in Convent school.", "format_instruction":parser.get_format_instructions() }) After printing this I am not getting any output. consol output is this {'properties': {'name': {'title': 'Name', 'description': 'name of the person', 'type': 'string'}, 'age': {'title': 'Age', 'description': 'age of the person', 'type': 'integer'}, 'address': {'title': 'Address', 'description': 'address of the person', 'type': 'string'}}, 'required': ['name', 'age', 'address']} However If I am commenting address field from the pydantic, I am able to print age and name. Not sure where I am making the mistake
@iammadhankumar
@iammadhankumar 5 месяцев назад
Hi, which model should we use for code migration? For example, migrating a Java servlet controller to a Spring Boot controller.
@leonvanzyl
@leonvanzyl 5 месяцев назад
GPT 4 and Clause Sonnet would be perfect for your use-case.
@CreatewwwPl
@CreatewwwPl 4 месяца назад
Leo, You should import `pydantic.v1` instead of `langchain_core.pydentic_v1`.
@leonvanzyl
@leonvanzyl 4 месяца назад
Oh my goodness, did they move things around again? Thanks 😊
@CreatewwwPl
@CreatewwwPl 4 месяца назад
@@leonvanzyl yes
@overprismatic-rv1ci
@overprismatic-rv1ci 3 месяца назад
Why your terminal has such cool colors? Mine is all white. Also my code has different colors...
@leonvanzyl
@leonvanzyl 3 месяца назад
I think it's because I was using the PowerShell terminal 😊
Далее
5 Useful F-String Tricks In Python
10:02
Просмотров 298 тыс.
Кого из блогеров узнали?
00:10
Просмотров 383 тыс.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
5 Things I Wish I Knew Before Learning Streamlit
21:34
When RESTful architecture isn't enough...
21:02
Просмотров 272 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 802 тыс.
Learn LangGraph - The Easy Way
28:29
Просмотров 26 тыс.