From 7df3d586e341cceed9b8a57955dbc97f9fb860f2 Mon Sep 17 00:00:00 2001 From: leslie-zi-pan Date: Sat, 27 Sep 2025 14:31:18 +0100 Subject: [PATCH] fix: Fix Prompt Composition/Concatenation Tutorial Example. Copy over Job Description, Generate LLM too allow runnable notebook. And --- chapter3/prompt_templates.ipynb | 129 +++++++++++++++++++++++++------- 1 file changed, 100 insertions(+), 29 deletions(-) diff --git a/chapter3/prompt_templates.ipynb b/chapter3/prompt_templates.ipynb index 96fe42e..c2deb16 100644 --- a/chapter3/prompt_templates.ipynb +++ b/chapter3/prompt_templates.ipynb @@ -10,6 +10,64 @@ "# Prompt templates" ] }, + { + "cell_type": "code", + "execution_count": 1, + "id": "4ffd99cf", + "metadata": {}, + "outputs": [], + "source": [ + "job_description = \"\"\"\n", + "SPS-Software Engineer (m/w/d) im Maschinenbau\n", + "Glaston Germany GmbH\n", + "Neuhausen-Hamberg\n", + "Feste Anstellung\n", + "Homeoffice möglich, Vollzeit\n", + "Erschienen: vor 1 Tag\n", + "Glaston Germany GmbH logo\n", + "SPS-Software Engineer (m/w/d) im Maschinenbau\n", + "Glaston Germany GmbH\n", + "slide number 1slide number 2slide number 3\n", + "Glaston ist eine internationale Marke mit weltweit führenden Unternehmen, die für zukunftsweisende Maschinen, Anlagen, Systeme und Dienstleistungen in der Bearbeitung von Architektur-, Fahrzeug- und Displayglas steht.\n", + "\n", + "Mit unserer über 50-jährigen Erfahrung am Standort Glaston Germany GmbH in Neuhausen bei Pforzheim verbessern und sichern wir nachhaltig die Produktivität unserer Kunden bei der Fertigung von Architekturglas. Diesen Erfolg verdanken wir unseren motivierten und engagierten Mitarbeitenden und wurden so zu einem der führenden Anbieter von automatisierten und kundenspezifischen Anlagen.\n", + "\n", + "Der Umgang mit Software liegt dir im Blut und du möchtest bei einem Hidden Champion durchstarten?\n", + "Dein Faible für Softwarelösungen und dein Herz für unterschiedliche Technologien sind ideale Voraussetzungen, um Maschinen wieder zu alter Stärke zu verhelfen?\n", + "Du hast einen ausgeprägten Servicegedanken und Spaß an der Arbeit mit Kunden?\n", + "\n", + "Dann komm zu Glaston! Wir suchen ab sofort für unseren Bereich Service Upgrades Verstärkung!\n", + "\n", + "SPS-SOFTWARE ENGINEER (M/W/D) IM MASCHINENBAU\n", + "\n", + "Als SPS-Software Engineer (m/w/d) im Maschinenbau sind deine Aufgabengebiete:\n", + "Ausarbeitung und Weiterentwicklung von Kundenaufträgen und Upgrade-Konzepten\n", + "Selbstständige und termingerechte Bearbeitung von Kundenprojekten und Bereitstellung der notwendigen Dokumente\n", + "Unterstützung des Inbetriebnahme- und Servicepersonals im Haus und beim Kunden vor Ort\n", + "Diese Anforderungen musst du mitbringen:\n", + "Qualifizierte technische Ausbildung: Techniker, Studium oder vergleichbare Qualifikation\n", + "Mehrjährige Berufserfahrung im Serviceumfeld, idealerweise im Maschinen- und Anlagenbau\n", + "Umfangreiche Kenntnisse in verschiedenen SPS-Programmiersprachen (z.B. S7Classic, TIA, Simotion)\n", + "Bei uns profitierst du von folgenden Benefits:\n", + "Exzellente Rahmenbedingungen (z.B. attraktives Gehaltsmodell, flexible Arbeitszeiten mit Gleitzeit und Homeoffice-Möglichkeiten)\n", + "Attraktives Arbeitsumfeld in idyllisch-ländlicher Lage\n", + "Umfangreiche Mobilitätsförderung (z.B. Ladestation für Elektroautos)\n", + "Wellbeing am Arbeitsplatz\n", + "\"\"\"" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "5a580add", + "metadata": {}, + "outputs": [], + "source": [ + "from langchain_google_genai.chat_models import ChatGoogleGenerativeAI\n", + "\n", + "llm = ChatGoogleGenerativeAI(model=\"gemini-2.5-flash\")" + ] + }, { "cell_type": "markdown", "id": "QDRcSgdcOUaD", @@ -22,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 6, "id": "QlVszeXzPzWl", "metadata": { "colab": { @@ -46,7 +104,17 @@ "name": "stdout", "output_type": "stream", "text": [ - "content='Okay, based on the job description \"test job description\", it\\'s impossible to definitively say whether it suits a junior Java developer.\\n\\n**Why?**\\n\\n* **Lack of Information:** A \"test job description\" provides absolutely no details about the required skills, experience, responsibilities, or technologies involved.\\n\\n**To determine suitability, we would need a real job description that includes details such as:**\\n\\n* **Required skills:** Java, Spring, SQL, REST APIs, etc.\\n* **Experience level:** Entry-level, 0-2 years, etc.\\n* **Responsibilities:** Writing code, testing, debugging, participating in code reviews, etc.\\n* **Technologies used:** Specific frameworks, libraries, databases, etc.\\n* **Team environment:** Agile, Scrum, etc.\\n\\nIf the description mentions basic Java concepts, some familiarity with common frameworks, and a willingness to learn, it\\'s *more likely* suitable for a junior developer. If it\\'s full of advanced concepts and expects independent work on complex systems, it\\'s *less likely* suitable.\\n\\n**In conclusion, based only on \"test job description\" it is impossible to decide.**\\n' additional_kwargs={} response_metadata={'is_blocked': False, 'safety_ratings': [], 'usage_metadata': {'prompt_token_count': 23, 'candidates_token_count': 248, 'total_token_count': 271, 'prompt_tokens_details': [{'modality': 1, 'token_count': 23}], 'candidates_tokens_details': [{'modality': 1, 'token_count': 248}], 'cached_content_token_count': 0, 'cache_tokens_details': []}, 'finish_reason': 'STOP', 'avg_logprobs': -0.3330915820214056} id='run-dc91ce96-8860-44c8-bf13-9afc402be0cf-0' usage_metadata={'input_tokens': 23, 'output_tokens': 248, 'total_tokens': 271}\n" + "No, this job description **does not suit a junior Java developer** at all.\n", + "\n", + "Here's why:\n", + "\n", + "1. **Core Technology:** The job title and requirements explicitly state \"SPS-Software Engineer\" and demand \"Umfangreiche Kenntnisse in verschiedenen SPS-Programmiersprachen (z.B. S7Classic, TIA, Simotion)\". SPS stands for \"Speicherprogrammierbare Steuerung\" (Programmable Logic Controller - PLC). These are industrial control systems, and the programming languages mentioned (S7Classic, TIA Portal, Simotion) are specific to Siemens PLCs, using languages like LAD (Ladder Diagram), FBD (Function Block Diagram), STL (Statement List), or SCL (Structured Control Language), which are fundamentally different from Java.\n", + "\n", + "2. **Domain:** The role is in \"Maschinenbau\" (mechanical engineering/machine construction), focusing on industrial automation and machinery for glass processing. This is a highly specialized field, not general-purpose software development typically associated with Java.\n", + "\n", + "3. **Experience Level:** The requirements ask for \"Mehrjährige Berufserfahrung im Serviceumfeld, idealerweise im Maschinen- und Anlagenbau\" (Several years of professional experience in a service environment, ideally in mechanical and plant engineering). \"Several years\" directly contradicts the \"junior\" level, which typically implies 0-3 years of experience. The tasks also suggest a high degree of autonomy (\"Selbstständige... Bearbeitung von Kundenprojekten\").\n", + "\n", + "In summary, this is a role for an experienced **PLC (Programmable Logic Controller) engineer** with a background in industrial automation, not a Java developer, junior or otherwise.\n" ] } ], @@ -56,7 +124,7 @@ " \"\\nJOB DESCRIPTION:\\n{job_description}\\n\"\n", ")\n", "result = llm.invoke(prompt_template.format(job_description=job_description))\n", - "print(result)" + "print(result.content)" ] }, { @@ -71,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 7, "id": "-XGjPYPCn5dK", "metadata": { "colab": { @@ -97,7 +165,7 @@ "StringPromptValue(text='Given a job description, decide whether it suites a junior Java developer.\\nJOB DESCRIPTION:\\nfake_jd\\n')" ] }, - "execution_count": 15, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -111,7 +179,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 8, "id": "V3nlya0JoFIE", "metadata": { "colab": { @@ -135,10 +203,10 @@ { "data": { "text/plain": [ - "'Okay, I\\'ve reviewed the job description: \"test job description\".\\n\\nBased on that incredibly limited information, **yes, it *could* suit a junior Java developer, but it\\'s impossible to say for sure.**\\n\\nHere\\'s why:\\n\\n* **Lack of Detail:** A junior Java developer usually needs a job description that specifies the technologies, frameworks, and types of projects they will be working on. \"test job description\" doesn\\'t provide any of that.\\n* **Possibility of Entry-Level Testing:** It could be a job for testing Java applications, which a junior developer could potentially do (especially with guidance).\\n* **Could Be Anything:** It\\'s so vague it could literally be anything. Maybe it\\'s a placeholder, or maybe it\\'s deliberately sparse.\\n\\n**To make a real decision, you\\'d need a *real* job description. Look for keywords like:**\\n\\n* **Required Skills:** Java, Spring, Spring Boot, REST APIs, SQL, Git, Maven/Gradle, Unit Testing (JUnit/Mockito), etc.\\n* **Responsibilities:** Writing code, debugging, testing, participating in code reviews, working in a team, following coding standards, documenting code.\\n* **Experience Level:** \"Entry-level,\" \"Junior,\" \"1-3 years experience.\"\\n* **Team Environment:** Does it mention mentorship or opportunities for learning?\\n\\n**In conclusion:** \"test job description\" is not enough to determine suitability. You NEED a detailed description of the job requirements and responsibilities.\\n'" + "'No, this job description **does not suit a junior Java developer**.\\n\\nHere\\'s why:\\n\\n1. **Core Technology:** The job title \"SPS-Software Engineer\" and the explicit requirement for \"Umfangreiche Kenntnisse in verschiedenen SPS-Programmiersprachen (z.B. S7Classic, TIA, Simotion)\" clearly indicate that this role is for a **Programmable Logic Controller (PLC) developer**. SPS stands for \"Speicherprogrammierbare Steuerung\" (PLC). S7Classic, TIA Portal, and Simotion are specific Siemens platforms and languages used for industrial automation, not Java.\\n2. **Experience Level:** The job requires \"Mehrjährige Berufserfahrung im Serviceumfeld, idealerweise im Maschinen- und Anlagenbau\" (Several years of professional experience in a service environment, ideally in mechanical and plant engineering). This directly contradicts the \"junior\" designation, which typically implies 0-2 years of experience.\\n3. **Domain:** The role is within \"Maschinenbau\" (mechanical engineering/machine construction), specifically for glass processing machinery. While Java can be used in some industrial applications, this particular role is focused on the low-level control of machines using PLCs.\\n4. **Responsibilities:** Tasks like \"Unterstützung des Inbetriebnahme- und Servicepersonals im Haus und beim Kunden vor Ort\" (Support for commissioning and service personnel in-house and at the customer\\'s site) are typical for industrial automation/field service roles, not standard for a junior Java developer focused on application development.\\n\\nA junior Java developer would typically be working with Java, its frameworks (like Spring, Hibernate), databases, web technologies, etc., and would not possess the specialized knowledge in PLC programming required here.'" ] }, - "execution_count": 16, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -153,7 +221,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 9, "id": "vI1mNkX7gsQ3", "metadata": { "colab": { @@ -177,10 +245,10 @@ { "data": { "text/plain": [ - "'Okay, I\\'ve reviewed the job description: \"test job description\".\\n\\nBased on this *extremely* limited information, it\\'s impossible to definitively say whether it suits a junior Java developer. However, the fact that it\\'s labeled \"test\" suggests it likely lacks the specific requirements and responsibilities needed for a real job.\\n\\nHere\\'s a breakdown of why and what information is needed to make a proper determination:\\n\\n**Why it\\'s impossible to say with current information:**\\n\\n* **No Technologies Mentioned:** It doesn\\'t specify Java or any related technologies (Spring, Hibernate, etc.).\\n* **No Experience Level Indicated:** It doesn\\'t mention experience requirements.\\n* **No Responsibilities Listed:** We have no idea what the job entails.\\n* **No Skills Required:** We don\\'t know what skills are needed to perform the job.\\n\\n**What Information is needed to assess suitability for a Junior Java Developer:**\\n\\nTo determine if the job suits a Junior Java Developer, the description needs to include:\\n\\n* **Required Technologies:** Must explicitly mention Java and ideally any relevant frameworks (Spring, Spring Boot, Hibernate, etc.), build tools (Maven, Gradle), testing frameworks (JUnit, Mockito), and databases (SQL, NoSQL).\\n* **Responsibilities:** Example responsibilities for a junior developer might include:\\n * Writing clean, well-documented Java code.\\n * Participating in code reviews.\\n * Assisting senior developers with more complex tasks.\\n * Writing unit tests.\\n * Debugging and troubleshooting issues.\\n * Working with version control systems (Git).\\n * Contributing to team discussions and problem-solving.\\n* **Required Skills:** Examples include:\\n * Strong understanding of Java fundamentals (OOP, data structures, algorithms).\\n * Basic knowledge of database concepts.\\n * Familiarity with software development methodologies (Agile, Scrum).\\n * Ability to work independently and as part of a team.\\n * Good communication skills.\\n* **Experience Level:** Explicitly state \"Junior,\" \"Entry-Level,\" or indicate 0-2 years of experience.\\n* **Educational Requirements:** Specify a relevant degree (Computer Science, Software Engineering, etc.) or equivalent experience.\\n\\n**In conclusion:**\\n\\nBased *solely* on \"test job description\", I can\\'t make a determination. It\\'s almost certainly *not* a real job posting. A real job posting would have substantially more information.\\n'" + "'No, this job description does **not** suit a junior Java developer.\\n\\nHere\\'s why:\\n\\n1. **Technology Mismatch:**\\n * The core of the role is \"SPS-Software Engineer\" (PLC Software Engineer).\\n * The required skills explicitly mention \"Umfangreiche Kenntnisse in verschiedenen SPS-Programmiersprachen (z.B. S7Classic, TIA, Simotion)\". These are proprietary programming languages and environments for Programmable Logic Controllers (PLCs), primarily Siemens, used in industrial automation.\\n * There is **no mention** of Java, object-oriented programming, web frameworks, or any other typical Java development skills.\\n\\n2. **Experience Level Mismatch:**\\n * The job explicitly asks for \"**Mehrjährige Berufserfahrung** im Serviceumfeld, idealerweise im Maschinen- und Anlagenbau\" (Several years of professional experience in a service environment, ideally in mechanical and plant engineering).\\n * \"Mehrjährige Berufserfahrung\" (several years of professional experience) directly contradicts the \"junior\" level, which typically implies 0-2 or maybe 3 years of experience. The role also asks for \"Umfangreiche Kenntnisse\" (extensive knowledge) in PLC programming.\\n\\nThis role is for an experienced PLC (Programmable Logic Controller) software engineer, likely with a background in industrial automation or mechanical/plant engineering, not a junior Java developer.'" ] }, - "execution_count": 17, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -201,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 10, "id": "s-Pmzk_odIBF", "metadata": { "colab": { @@ -225,10 +293,10 @@ { "data": { "text/plain": [ - "'Okay, I\\'ve reviewed the job description \"test job description\".\\n\\n**Verdict:**\\n\\nThis job description is too vague to determine if it suits a junior Java developer.\\n\\n**Reasoning:**\\n\\nA junior developer role typically requires some indication of the following:\\n\\n* **Required Skills:** Does it mention Java? Does it mention specific Java frameworks (like Spring, Spring Boot, Hibernate)? Does it mention related technologies like databases (SQL, NoSQL), or build tools (Maven, Gradle)?\\n* **Experience Level:** Does it explicitly state \"Junior,\" \"Entry-Level,\" or indicate a number of years of experience (e.g., 0-2 years)?\\n* **Responsibilities:** Does it describe tasks that a junior developer would typically handle, such as:\\n * Writing code under the supervision of senior developers.\\n * Debugging and testing existing code.\\n * Implementing well-defined features.\\n * Participating in code reviews.\\n * Learning new technologies.\\n* **Teamwork and Communication:** Does it emphasize the ability to work in a team and communicate effectively?\\n\\n**To make a proper assessment, I need a *real* job description with more details.** Without specifics, I can\\'t say whether it\\'s appropriate for a junior Java developer.\\n'" + "'No, this job description is **not** suitable for a junior Java developer.\\n\\nHere\\'s why:\\n\\n1. **Technology Mismatch (Not Java):**\\n * The job title is \"SPS-Software Engineer (m/w/d) im Maschinenbau.\" \"SPS\" stands for **Speicherprogrammierbare Steuerung** (Programmable Logic Controller - PLC).\\n * The requirements explicitly state: \"Umfangreiche Kenntnisse in verschiedenen SPS-Programmiersprachen (z.B. S7Classic, TIA, Simotion)\". These are all specific to PLC programming (primarily Siemens platforms) used in industrial automation and machine control, which is completely different from Java development. Java is not mentioned anywhere in the description.\\n\\n2. **Experience Level Mismatch (Not Junior):**\\n * The requirements ask for: \"**Mehrjährige Berufserfahrung** im Serviceumfeld, idealerweise im Maschinen- und Anlagenbau\" (Several years of professional experience in a service environment, ideally in mechanical and plant engineering). \"Several years\" clearly indicates a mid-level to senior role, not a junior position.\\n\\nIn summary, this is a role for an experienced **PLC Programmer** with a background in industrial automation/mechanical engineering, not a junior Java developer.'" ] }, - "execution_count": 18, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -249,7 +317,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 11, "id": "zgAplWwXeTu5", "metadata": { "colab": { @@ -273,10 +341,10 @@ { "data": { "text/plain": [ - "'Okay, I\\'ve reviewed the job description \"test job description\".\\n\\nWithout any details about the required skills, experience, or responsibilities, it\\'s impossible to definitively say whether it suits a junior Java developer. \\n\\n**To determine suitability, I would need more information. Ideally, a good job description for a Junior Java Developer role would include the following:**\\n\\n* **Required Skills:**\\n * **Java:** Core Java knowledge (data structures, algorithms, OOP principles).\\n * **IDE:** Experience with IDEs like IntelliJ IDEA or Eclipse.\\n * **Build Tools:** Familiarity with Maven or Gradle.\\n * **Testing:** Basic understanding of unit testing with frameworks like JUnit or TestNG.\\n * **Version Control:** Experience with Git.\\n * **Databases:** Basic knowledge of SQL and relational databases (e.g., MySQL, PostgreSQL).\\n * **Web Technologies (Optional):** Exposure to Servlets, JSP, or basic web frameworks is a plus.\\n* **Responsibilities:**\\n * Writing clean, well-documented, and testable code.\\n * Participating in code reviews.\\n * Working with senior developers to learn and implement new features.\\n * Troubleshooting and debugging issues.\\n * Contributing to the design and architecture of software systems.\\n * Potentially writing unit tests.\\n* **Experience Level:** Explicitly stating that it\\'s an entry-level or junior position.\\n* **Education:** A degree in Computer Science or a related field might be preferred, or equivalent experience.\\n\\n**In conclusion:**\\n\\nBecause the job description you provided is just \"test job description\", I cannot assess if it suits a junior Java developer. Provide more details and I will be happy to help.\\n'" + "'**No, this job description is absolutely not suitable for a junior Java developer.**\\n\\nHere\\'s why:\\n\\n1. **Technology Focus (SPS vs. Java):**\\n * The job title is \"SPS-Software Engineer (m/w/d) im Maschinenbau\". \"SPS\" stands for *Speicherprogrammierbare Steuerung*, which is German for **Programmable Logic Controller (PLC)**.\\n * The core requirement is \"Umfangreiche Kenntnisse in verschiedenen SPS-Programmiersprachen (z.B. S7Classic, TIA, Simotion)\". These are specific Siemens PLC programming environments and languages (Ladder Logic, Structured Text, Function Block Diagram, etc.), which are completely different from Java.\\n * There is absolutely no mention of Java, Spring, Hibernate, web development, databases, or any other technologies typically associated with Java development.\\n\\n2. **Experience Level (Junior vs. Experienced):**\\n * The job explicitly states: \"**Mehrjährige Berufserfahrung** im Serviceumfeld, idealerweise im Maschinen- und Anlagenbau\" (Several years of professional experience in a service environment, ideally in mechanical and plant engineering). \"Mehrjährige\" means \"several years,\" which directly contradicts a \"junior\" or entry-level position.\\n\\n3. **Domain:**\\n * The role is in \"Maschinenbau\" (mechanical engineering/machine building) and involves \"Service Upgrades\" for industrial machinery, which is a highly specialized field of industrial automation, not general software development.\\n\\nIn summary, this is a role for an experienced PLC programmer/engineer in the industrial automation sector, not a junior Java developer.'" ] }, - "execution_count": 19, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -291,7 +359,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 12, "id": "CrnUj6ibmOFU", "metadata": { "id": "CrnUj6ibmOFU" @@ -309,7 +377,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 13, "id": "shEcEyFCmWGL", "metadata": { "colab": { @@ -335,7 +403,7 @@ "ChatPromptValue(messages=[SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}), HumanMessage(content='Given a job description, decide whether it suites a junior Java developer.\\nJOB DESCRIPTION:\\nfake\\n', additional_kwargs={}, response_metadata={})])" ] }, - "execution_count": 21, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -346,7 +414,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 14, "id": "wBJiC6Pemaio", "metadata": { "colab": { @@ -372,7 +440,7 @@ "4" ] }, - "execution_count": 22, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -383,7 +451,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 15, "id": "OJsYY21VexD_", "metadata": { "id": "OJsYY21VexD_" @@ -409,7 +477,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "id": "iJzmiC3VsGBZ", "metadata": { "colab": { @@ -459,7 +527,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "SQ125jSEwpXe", "metadata": { "colab": { @@ -490,13 +558,13 @@ "source": [ "system_template_part1 = PromptTemplate.from_template(\"a: {a}\")\n", "system_template_part2 = PromptTemplate.from_template(\"b: {b}\")\n", - "system_template = system_template_part1 + system_template_part2\n", - "print(system_template_part.invoke({\"a\": \"a\", \"b\": \"b\"}).text)" + "system_template = system_template_part1 + \" \" + system_template_part2\n", + "print(system_template.invoke({\"a\": \"a\", \"b\": \"b\"}).text)" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "id": "IKbQlaLdfSPH", "metadata": { "colab": { @@ -521,7 +589,10 @@ "output_type": "stream", "text": [ "3\n", - "a: a b: b\n" + "a: a b: b\n", + "hi\n", + "c\n", + "[SystemMessage(content='a: a b: b', additional_kwargs={}, response_metadata={}), HumanMessage(content='hi', additional_kwargs={}, response_metadata={}), AIMessage(content='c', additional_kwargs={}, response_metadata={})]\n" ] } ],