Skip to content

Commit

Permalink
Tests are set up, some still failing
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Aug 19, 2023
1 parent 407d4c3 commit 09d9def
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions lucidserver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .actions import *
from .endpoints import *
from .memories import *
2 changes: 1 addition & 1 deletion lucidserver/actions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def call_function_by_name(function_name, prompt, messages):
return response

def search_chat_with_dreams(function_name, prompt, user_email, messages=None):
from memories import search_dreams
from lucidserver.memories import search_dreams
global message_histories # Access the global dictionary

try:
Expand Down
2 changes: 1 addition & 1 deletion lucidserver/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# app.py

from flask import Flask
from endpoints import register_endpoints
from lucidserver.endpoints import register_endpoints
from agentlogger import print_header

app = Flask(__name__)
Expand Down
4 changes: 2 additions & 2 deletions lucidserver/endpoints/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
from webargs import fields
from webargs.flaskparser import use_args
from memories import (
from lucidserver.memories import (
create_dream,
get_dreams,
get_dream,
Expand All @@ -15,7 +15,7 @@
search_dreams,
delete_dream
)
from actions import search_chat_with_dreams, regular_chat
from lucidserver.actions import search_chat_with_dreams, regular_chat
from agentlogger import log
import traceback

Expand Down
2 changes: 1 addition & 1 deletion lucidserver/memories/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import time
from agentlogger import log
from agentmemory import create_memory, get_memories, update_memory, get_memory, search_memory, delete_memory
from actions import generate_dream_analysis, generate_dream_image, get_image_summary
from lucidserver.actions import generate_dream_analysis, generate_dream_image, get_image_summary

def create_dream(title, date, entry, userEmail):
"""Create a new dream in the memory.
Expand Down
3 changes: 3 additions & 0 deletions lucidserver/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .actions_tests import *
from .endpoints_tests import *
from .memories_tests import *
1 change: 0 additions & 1 deletion lucidserver/tests/memories_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys
sys.path.append('.')

import pytest
from lucidserver.memories.main import create_dream, get_dream, get_dreams, get_dream_analysis, get_dream_image, update_dream_analysis_and_image, search_dreams
from lucidserver.actions.main import generate_dream_analysis, generate_dream_image, get_image_summary

Expand Down
Binary file modified requirements.txt
Binary file not shown.
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from lucidserver.tests import *

0 comments on commit 09d9def

Please sign in to comment.