Skip to content

Commit 396606d

Browse files
committed
Our baby will now remember the past conversations
1 parent bee97a0 commit 396606d

19 files changed

+120
-36
lines changed

__pycache__/config.cpython-312.pyc

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

agents/generator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# agents/generator.py
22
from .base import BaseAgent
33
from gemini_utils import setup_gemini
4+
from datetime import datetime
45

56
class GeneratorAgent(BaseAgent):
67
"""Agent responsible for generating answers using Gemini."""
@@ -36,6 +37,9 @@ def create_prompt(self, query: str, context_chunks: list[dict], query_analysis:
3637
3738
**Question:**
3839
{query}
40+
41+
Current date and time:
42+
{datetime.now().strftime('%Y-%m-%d')}
3943
"""
4044

4145
# Customize instructions based on query type
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "bot", "message": "Sorry, I don't have an answer for that right now.\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "hi"}, {"sender": "bot", "message": "Hi! I'm Yuhasa, your AI history tutor. I can't answer your question because you haven't asked me anything. Please ask me a history question related to the provided text.\n\n\n*References: [p. 9, 10, 11]*"}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "hi"}, {"sender": "bot", "message": "Hello! How can I help you today?"}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "how are u doin bro"}, {"sender": "user", "message": "how are u doin bro"}, {"sender": "bot", "message": "Hello there! I'm doing well, thank you for asking. How can I help you with your history studies today?"}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "how are u doin bro"}, {"sender": "bot", "message": "Hello there! I'm doing well, thank you for asking. How can I help you with your history studies today?\n\n\n"}, {"sender": "user", "message": "When did the Colombo\u2013Kandy train service first start?"}, {"sender": "user", "message": "When did the Colombo\u2013Kandy train service first start?"}, {"sender": "bot", "message": "The Colombo-Kandy train service first started in August 1867."}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "how are u doin bro"}, {"sender": "bot", "message": "Hello there! I'm doing well, thank you for asking. How can I help you with your history studies today?\n\n\n"}, {"sender": "user", "message": "When did the Colombo\u2013Kandy train service first start?"}, {"sender": "bot", "message": "The Colombo-Kandy train service first started in August 1867.\n\n\n"}, {"sender": "user", "message": "How many members did the Legislative Council consist of under the Crew\u2013McCallum Constitution?"}, {"sender": "user", "message": "How many members did the Legislative Council consist of under the Crew\u2013McCallum Constitution?"}, {"sender": "bot", "message": "The Crew-McCallum Constitution, implemented in 1912, increased the size of the Legislative Council to 21 members."}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "how are u doin bro"}, {"sender": "bot", "message": "Hello there! I'm doing well, thank you for asking. How can I help you with your history studies today?\n\n\n"}, {"sender": "user", "message": "When did the Colombo\u2013Kandy train service first start?"}, {"sender": "bot", "message": "The Colombo-Kandy train service first started in August 1867.\n\n\n"}, {"sender": "user", "message": "How many members did the Legislative Council consist of under the Crew\u2013McCallum Constitution?"}, {"sender": "bot", "message": "The Crew-McCallum Constitution, implemented in 1912, increased the size of the Legislative Council to 21 members.\n\n\n"}, {"sender": "user", "message": "World War II"}, {"sender": "user", "message": "World War II"}, {"sender": "bot", "message": "World War II, lasting from September 1939 to August 1945, was a devastating conflict that followed World War I by about two decades. Several factors contributed to its outbreak. These include:\n\n* **Hitler's rise to power and aggressive actions:** Hitler's rise in Germany, fueled by the failures of the Weimar Republic and the harsh terms of the Treaty of Versailles, led to a resurgence of German militarism and expansionist policies. His invasions of Austria, Czechoslovakia, and ultimately Poland triggered the war.\n\n* **Competition between powerful nations:** Intense rivalry between major European powers, particularly regarding colonies and armaments, created a volatile atmosphere. This competition fostered mistrust and hostility, making conflict more likely.\n\n* **The failure of the League of Nations:** The League of Nations, intended to prevent future wars, proved ineffective in curbing the aggression of Germany, Italy, and Japan. Its weakness contributed to the escalation of tensions.\n\n* **Japan's expansionist ambitions:** Japan, seeking resources and markets, embarked on a program of conquest in Asia, further destabilizing the global order. Its attack on Pearl Harbor brought the United States into the war.\n\nThe war resulted in immense destruction and loss of life (estimated to be over 50 million), the defeat of the Axis powers (Germany, Italy, and Japan), and the emergence of the United States and the Soviet Union as superpowers. The aftermath also saw the establishment of the United Nations, intended to promote international peace and security. The war\u2019s lasting impact includes the atomic bombings of Hiroshima and Nagasaki, the widespread use of concentration camps, and the independence of many former European colonies."}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"sender": "bot", "message": "Hi there! \ud83d\udc4b I'm Histronaut, your AI history tutor. Ask me anything about history or click one of the suggestions above to get started!\n\n\n"}, {"sender": "user", "message": "hi"}, {"sender": "user", "message": "how are u doin bro"}, {"sender": "bot", "message": "Hello there! I'm doing well, thank you for asking. How can I help you with your history studies today?\n\n\n"}, {"sender": "user", "message": "When did the Colombo\u2013Kandy train service first start?"}, {"sender": "bot", "message": "The Colombo-Kandy train service first started in August 1867.\n\n\n"}, {"sender": "user", "message": "How many members did the Legislative Council consist of under the Crew\u2013McCallum Constitution?"}, {"sender": "bot", "message": "The Crew-McCallum Constitution, implemented in 1912, increased the size of the Legislative Council to 21 members.\n\n\n"}, {"sender": "user", "message": "World War II"}, {"sender": "bot", "message": "World War II, lasting from September 1939 to August 1945, was a devastating conflict that followed World War I by about two decades. Several factors contributed to its outbreak. These include:\n\n\n\n\n\n\nHitler's rise to power and aggressive actions: Hitler's rise in Germany, fueled by the failures of the Weimar Republic and the harsh terms of the Treaty of Versailles, led to a resurgence of German militarism and expansionist policies. His invasions of Austria, Czechoslovakia, and ultimately Poland triggered the war.\n\n\n\n\n\n\nCompetition between powerful nations: Intense rivalry between major European powers, particularly regarding colonies and armaments, created a volatile atmosphere. This competition fostered mistrust and hostility, making conflict more likely.\n\n\n\n\n\n\nThe failure of the League of Nations: The League of Nations, intended to prevent future wars, proved ineffective in curbing the aggression of Germany, Italy, and Japan. Its weakness contributed to the escalation of tensions.\n\n\n\n\n\n\nJapan's expansionist ambitions: Japan, seeking resources and markets, embarked on a program of conquest in Asia, further destabilizing the global order. Its attack on Pearl Harbor brought the United States into the war.\n\n\n\n\n\n\n\n\nThe war resulted in immense destruction and loss of life (estimated to be over 50 million), the defeat of the Axis powers (Germany, Italy, and Japan), and the emergence of the United States and the Soviet Union as superpowers. The aftermath also saw the establishment of the United Nations, intended to promote international peace and security. The war\u2019s lasting impact includes the atomic bombings of Hiroshima and Nagasaki, the widespread use of concentration camps, and the independence of many former European colonies.\n\n\n"}, {"sender": "user", "message": "Industrial Revolution"}, {"sender": "user", "message": "Industrial Revolution"}, {"sender": "bot", "message": "The Industrial Revolution, beginning in Britain around the late 18th century, was a period of rapid technological and industrial advancements. It initially remained largely confined to Britain for about 50 years, but by the 19th century its influence spread across Europe and the rest of the world.\n\nThis transformative period saw the mass production of goods using machines instead of manual labor, a shift that occurred over roughly six decades. Key industries driving this change were textiles, coal, and iron, but the revolution's impact extended to transportation, communication, and agriculture.\n\nSeveral factors contributed to the Industrial Revolution's emergence in Britain:\n\n* **Economic Prosperity:** Britain's strong financial and commercial standing, exceeding other European powers like France and Spain by the 18th century, created a wealthy class capable of investing in industries.\n* **Population Growth:** A rapidly growing population fueled a high demand for goods, creating the impetus for increased production.\n* **Scientific Knowledge:** The Renaissance\u2019s advancements in science provided the knowledge needed to develop new machinery.\n* **Abundant Resources:** Britain possessed plentiful iron, steel, and coal, crucial for industrial production and energy generation.\n* **Political Stability:** Britain\u2019s political stability, with parliamentary support for business activities through tax relief and freedom, fostered a favorable environment for industrial growth.\n* **Geographic Advantages:** Being an island nation, Britain easily developed a national market network, facilitating trade and distribution. Its central location and access to resources facilitated high production and export.\n\n\nThe Industrial Revolution had both positive and negative consequences:\n\n* **Positive Impacts:** Increased production led to affordable goods and more job opportunities, improving living standards for many. Urbanization accelerated as people migrated to cities for work. New technologies drastically improved transportation and communication. Agricultural advancements, like the introduction of new machinery and farming methods, boosted productivity.\n\n* **Negative Impacts:** The rapid growth of factories led to severe pollution, harming the environment and people's health. It also created stark social inequalities\u2014a wealthy class of factory owners and investors contrasted sharply with a poor working class, often subjected to harsh working conditions, low wages, and unsafe environments. This disparity fueled social unrest and the emergence of labor movements advocating for better rights."}]

0 commit comments

Comments
 (0)