Skip to content

Commit

Permalink
enh: scaffolds
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbck committed Jun 2, 2024
1 parent 73c340f commit c19f52b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/scaffolds/example_pipeline_scaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def pipe(
# This is where you can add your custom pipelines like RAG.
print(f"pipe:{__name__}")

# If you'd like to check for title generation, you can add the following check
if body.get("title", False):
print("Title Generation Request")

print(messages)
print(user_message)
print(body)
Expand Down
4 changes: 4 additions & 0 deletions examples/scaffolds/filter_pipeline_scaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ async def inlet(self, body: dict, user: Optional[dict] = None) -> dict:
# This filter is applied to the form data before it is sent to the OpenAI API.
print(f"inlet:{__name__}")

# If you'd like to check for title generation, you can add the following check
if body.get("title", False):
print("Title Generation Request")

print(body)
print(user)

Expand Down
4 changes: 4 additions & 0 deletions examples/scaffolds/manifold_pipeline_scaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def pipe(
# This is where you can add your custom pipelines like RAG.
print(f"pipe:{__name__}")

# If you'd like to check for title generation, you can add the following check
if body.get("title", False):
print("Title Generation Request")

print(messages)
print(user_message)
print(body)
Expand Down

0 comments on commit c19f52b

Please sign in to comment.