Initial commit: myai agent framework
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
# Downloaded repos (not original work)
|
||||
download/
|
||||
|
||||
# Agent data (local state)
|
||||
agent_data/
|
||||
|
||||
# Python
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.venv/
|
||||
@@ -0,0 +1,46 @@
|
||||
# Define Rooms
|
||||
rooms = {
|
||||
'start': {
|
||||
'name': 'Start',
|
||||
'description': "You find yourself in the dimly lit hallway. The walls are bare and you notice several doors leading to different rooms.",
|
||||
'north': 'hallway'
|
||||
},
|
||||
'hallway': {
|
||||
'name': 'Hallway',
|
||||
'description': "A long corridor with no visible exits."
|
||||
}
|
||||
}
|
||||
|
||||
# Define Player State
|
||||
player = {
|
||||
'current_room': 'start',
|
||||
'inventory': []
|
||||
}
|
||||
|
||||
def move(current_room, direction):
|
||||
return rooms[current_room][direction]
|
||||
|
||||
def look():
|
||||
print(f"Current Room: {player['current_room']]}\n")
|
||||
print(rooms[player['current_room']]['name']])
|
||||
if player['current_room'] == 'hallway':
|
||||
print("There are several doors leading to different rooms.")
|
||||
else:
|
||||
print("You see a door to the north.")
|
||||
|
||||
while True:
|
||||
action = input("What do you want to do? Type 'look', 'move north', or 'quit' to exit: ")
|
||||
|
||||
if action == 'look':
|
||||
look()
|
||||
elif action == 'move north':
|
||||
current_room_name = player['current_room']
|
||||
result = move(current_room_name, 'north')
|
||||
if isinstance(result, str):
|
||||
print(result)
|
||||
else:
|
||||
player['current_room'] = result
|
||||
look()
|
||||
elif action == 'quit':
|
||||
print("Goodbye!")
|
||||
break
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
main = "./"
|
||||
cache = "./.agents"
|
||||
@@ -0,0 +1,11 @@
|
||||
[[contacts]]
|
||||
name = "user"
|
||||
email = "user@localhost"
|
||||
telegram = "@user"
|
||||
is_family_member = false
|
||||
added_by = "user"
|
||||
tags = []
|
||||
notes = "OpenDAN user"
|
||||
now = "2026-06-02 03:27:58"
|
||||
relationship = "Principal"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[[llama]]
|
||||
url = "http://127.0.0.1:8081"
|
||||
model_name = "Qwen2.5-3B-Instruct-Q4_K_M"
|
||||
|
||||
[[llama]]
|
||||
url = "http://127.0.0.1:8082"
|
||||
model_name = "bge-small-en-v1.5-q8_0"
|
||||
|
||||
[[llama]]
|
||||
url = "http://127.0.0.1:8083"
|
||||
model_name = "Llama-3.2-1B-Instruct-Q4_K_M"
|
||||
@@ -0,0 +1,12 @@
|
||||
username = "user"
|
||||
user_telegram = "@user"
|
||||
user_email = "user@localhost"
|
||||
user_notes = "OpenDAN user"
|
||||
|
||||
llm_default_model = "Qwen2.5-3B-Instruct-Q4_K_M"
|
||||
llm_plan_model = "Qwen2.5-3B-Instruct-Q4_K_M"
|
||||
llm_outline_model = "Qwen2.5-3B-Instruct-Q4_K_M"
|
||||
llm_swift_model = "Llama-3.2-1B-Instruct-Q4_K_M"
|
||||
|
||||
"feature.llama" = "True"
|
||||
"feature.aigc" = "True"
|
||||
@@ -0,0 +1,46 @@
|
||||
# Define Rooms
|
||||
rooms = {
|
||||
'start': {
|
||||
'name': 'Start',
|
||||
'description': "You find yourself in the dimly lit hallway. The walls are bare and you notice several doors leading to different rooms.",
|
||||
'north': 'hallway'
|
||||
},
|
||||
'hallway': {
|
||||
'name': 'Hallway',
|
||||
'description': "A long corridor with no visible exits."
|
||||
}
|
||||
}
|
||||
|
||||
# Define Player State
|
||||
player = {
|
||||
'current_room': 'start',
|
||||
'inventory': []
|
||||
}
|
||||
|
||||
def move(current_room, direction):
|
||||
return rooms[current_room][direction]
|
||||
|
||||
def look():
|
||||
current_room_name = player['current_room']
|
||||
print(rooms[current_room_name]['name']])
|
||||
if current_room_name == 'hallway':
|
||||
print("There are several doors leading to different rooms.")
|
||||
else:
|
||||
print("You see a door to the north.")
|
||||
|
||||
while True:
|
||||
action = input("What do you want to do? Type 'look', 'move north', or 'quit' to exit: ")
|
||||
|
||||
if action == 'look':
|
||||
look()
|
||||
elif action == 'move north':
|
||||
current_room_name = player['current_room']
|
||||
result = move(current_room_name, 'north')
|
||||
if isinstance(result, str):
|
||||
print(result)
|
||||
else:
|
||||
player['current_room'] = result
|
||||
look()
|
||||
elif action == 'quit':
|
||||
print("Goodbye!")
|
||||
break
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
main = "./"
|
||||
cache = "./.agents"
|
||||
Reference in New Issue
Block a user