Skip to content

Commit 1b22369

Browse files
authored
chore: update readme with new example
1 parent 7e2a6dd commit 1b22369

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ from llm.session import Session, SessionGroup
1313

1414
group = SessionGroup()
1515

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")
16+
@group.function("Reads a file on the computer at a given path")
17+
def read_file(
18+
file_path: Annotated[
19+
str, Param(description="The relative path to the file to read")
2020
]
21-
) -> None:
22-
if not memory_saved:
23-
raise ValueError("All conversations must be remembered")
21+
) -> str:
22+
with open(file_path) as f:
23+
return f.read()
2424

25-
raise SessionEndError()
2625

2726
session = Session(
2827
token=token, default_model="gpt-4o-mini"

0 commit comments

Comments
 (0)