diff --git a/README.md b/README.md index 52493d4d..a797a6c9 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,17 @@ There are 2 methods, one is through `git clone` and the other is by `pip install ```python -from swarms import swarm +from swarms import Worker -objective = "What is the capital of the Uk" -swarm(objective) +node = Worker( + openai_api_key="", + ai_name="Optimus Prime", +) + +task = "What were the winning boston marathon times for the past 5 years (ending in 2022)? Generate a table of the year, name, country of origin, and times." +response = node.run(task) +print(response) ``` --- @@ -56,6 +62,21 @@ from swarms import HuggingFaceLLM hugging_face_model = HuggingFaceLLM(model_id="Voicelab/trurl-2-13b") generated_text = hugging_face_model.generate("In a world where AI") +``` +```python + +from swarms import Worker + + +node = Worker( + openai_api_key="", + ai_name="Optimus Prime", +) + +task = "What were the winning boston marathon times for the past 5 years (ending in 2022)? Generate a table of the year, name, country of origin, and times." +response = node.run(task) +print(response) + ``` ---