We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e2a6dd commit 1b22369Copy full SHA for 1b22369
README.md
@@ -13,16 +13,15 @@ from llm.session import Session, SessionGroup
13
14
group = SessionGroup()
15
16
-@group.function("Ends the current chat thread")
17
-def end_chat(
18
- memory_saved: Annotated[
19
- bool, Param(description="If this conversation has already been saved to memory")
+@group.function("Reads a file on the computer at a given path")
+def read_file(
+ file_path: Annotated[
+ str, Param(description="The relative path to the file to read")
20
]
21
-) -> None:
22
- if not memory_saved:
23
- raise ValueError("All conversations must be remembered")
+) -> str:
+ with open(file_path) as f:
+ return f.read()
24
25
- raise SessionEndError()
26
27
session = Session(
28
token=token, default_model="gpt-4o-mini"
0 commit comments