-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b211085
commit 6932f87
Showing
5 changed files
with
75 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
from mentor_mingle.llm_handler import ChatHandler | ||
from mentor_mingle.persona.mentor import Mentor | ||
|
||
if __name__ == "__main__": | ||
mentor = Mentor() | ||
handler = ChatHandler(persona=mentor) | ||
|
||
handler = ChatHandler() | ||
while True: | ||
user_prompt = input("\nUser: ") | ||
for res in handler.stream_chat(user_prompt): | ||
end_char = "\n" if "." in res else "" | ||
print(res, end=end_char, flush=True) | ||
|
||
handler.last_chat = { | ||
"query": user_prompt, | ||
"assistant": "", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
import pytest | ||
import fakeredis | ||
|
||
@pytest.fixture(scope="session") | ||
def fake_redis() -> fakeredis.FakeStrictRedis: | ||
""" | ||
Create a fake Redis client. | ||
Returns: FakeRedis client | ||
""" | ||
return fakeredis.FakeStrictRedis() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters