Skip to content

Commit

Permalink
Add if __name__ == "__main__": block to tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
fm1320 committed Nov 20, 2024
1 parent 99705cf commit 6955c6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adalflow/tutorials/adalflow_dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ async def acall(self, query: str):
return await self.generator.acall({"input_str": query})


# Example usage function
def run_basic_example():
"""Run a basic example of the QA component"""
qa = QA(
model_client=GroqAPIClient(),
model_kwargs={"model": "llama3-8b-8192"},
Expand All @@ -59,4 +59,6 @@ def run_basic_example():
print(f"Example: {response.data.example}")


# Additional classes and functions can be added here following the same structure
if __name__ == "__main__":
print("Running basic QA example...")
run_basic_example()

0 comments on commit 6955c6b

Please sign in to comment.