Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 committed Aug 9, 2024
1 parent e6e4111 commit b2174d8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 22 deletions.
1 change: 1 addition & 0 deletions examples/crew/job_posting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@
"source": [
"from textwrap import dedent\n",
"\n",
"\n",
"class Tasks:\n",
" def research_company_culture_task(self, agent, company_description, company_domain):\n",
" return Task(\n",
Expand Down
44 changes: 25 additions & 19 deletions examples/crew/markdown_validator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
}
],
"source": [
"%pip install -U crewai \n",
"%pip install -U crewai\n",
"%pip install -U agentops\n",
"%pip install -U python-dotenv\n",
"%pip install -U langchain_openai\n",
Expand Down Expand Up @@ -400,7 +400,7 @@
},
"outputs": [],
"source": [
"agentops.init(AGENTOPS_API_KEY, default_tags=['markdown_validator'])"
"agentops.init(AGENTOPS_API_KEY, default_tags=[\"markdown_validator\"])"
]
},
{
Expand All @@ -424,7 +424,7 @@
" A tool to review files for markdown syntax errors.\n",
"\n",
" Returns:\n",
" - validation_results: A list of validation results \n",
" - validation_results: A list of validation results\n",
" and suggestions on how to fix them.\n",
" \"\"\"\n",
"\n",
Expand All @@ -439,7 +439,7 @@
" return results # Return the reviewed document\n",
" except PyMarkdownApiException as this_exception:\n",
" print(f\"API Exception: {this_exception}\", file=sys.stderr)\n",
" return f\"API Exception: {str(this_exception)}\"\n"
" return f\"API Exception: {str(this_exception)}\""
]
},
{
Expand All @@ -455,10 +455,12 @@
" model_name=\"llama3-70b-8192\",\n",
")\n",
"\n",
"default_llm = ChatOpenAI(openai_api_base=os.environ.get(\"OPENAI_API_BASE_URL\", \"https://api.openai.com/v1\"),\n",
" openai_api_key=OPENAI_API_KEY,\n",
" temperature=0.1, \n",
" model_name=os.environ.get(\"MODEL_NAME\", \"gpt-3.5-turbo\"))"
"default_llm = ChatOpenAI(\n",
" openai_api_base=os.environ.get(\"OPENAI_API_BASE_URL\", \"https://api.openai.com/v1\"),\n",
" openai_api_key=OPENAI_API_KEY,\n",
" temperature=0.1,\n",
" model_name=os.environ.get(\"MODEL_NAME\", \"gpt-3.5-turbo\"),\n",
")"
]
},
{
Expand Down Expand Up @@ -486,22 +488,24 @@
"metadata": {},
"outputs": [],
"source": [
"general_agent = Agent(role='Requirements Manager',\n",
" goal=\"\"\"Provide a detailed list of the markdown \n",
"general_agent = Agent(\n",
" role=\"Requirements Manager\",\n",
" goal=\"\"\"Provide a detailed list of the markdown \n",
" linting results. Give a summary with actionable \n",
" tasks to address the validation results. Write your \n",
" response as if you were handing it to a developer \n",
" to fix the issues.\n",
" DO NOT provide examples of how to fix the issues or\n",
" recommend other tools to use.\"\"\",\n",
" backstory=\"\"\"You are an expert business analyst \n",
" backstory=\"\"\"You are an expert business analyst \n",
"\t\t\t\t\tand software QA specialist. You provide high quality, \n",
" thorough, insightful and actionable feedback via \n",
" detailed list of changes and actionable tasks.\"\"\",\n",
" allow_delegation=False, \n",
" verbose=True,\n",
" tools=[markdown_validation_tool],\n",
" llm=default_llm) #groq_llm) "
" allow_delegation=False,\n",
" verbose=True,\n",
" tools=[markdown_validation_tool],\n",
" llm=default_llm,\n",
") # groq_llm)"
]
},
{
Expand All @@ -519,7 +523,8 @@
"metadata": {},
"outputs": [],
"source": [
"syntax_review_task = Task(description=f\"\"\"\n",
"syntax_review_task = Task(\n",
" description=f\"\"\"\n",
" Use the markdown_validation_tool to review \n",
" the file(s) at this path: {filename}\n",
" \n",
Expand All @@ -539,8 +544,9 @@
" \n",
" If you already know the answer or if you do not need \n",
" to use a tool, return it as your Final Answer.\"\"\",\n",
" agent=general_agent,\n",
" expected_output=\"\")"
" agent=general_agent,\n",
" expected_output=\"\",\n",
")"
]
},
{
Expand Down Expand Up @@ -576,7 +582,7 @@
"metadata": {},
"outputs": [],
"source": [
"agentops.end_session('Success')"
"agentops.end_session(\"Success\")"
]
}
],
Expand Down
4 changes: 3 additions & 1 deletion examples/litellm/litellm_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
"outputs": [],
"source": [
"messages = [{\"role\": \"user\", \"content\": \"Write a 12 word poem about secret agents.\"}]\n",
"response = litellm.completion(model=\"gpt-4\", messages=messages) # or the model of your choosing\n",
"response = litellm.completion(\n",
" model=\"gpt-4\", messages=messages\n",
") # or the model of your choosing\n",
"print(response.choices[0].message.content)"
]
},
Expand Down
4 changes: 3 additions & 1 deletion examples/multion/Autonomous_web_browsing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@
"metadata": {},
"outputs": [],
"source": [
"agentops.init(AGENTOPS_API_KEY, auto_start_session=False, default_tags=[\"MultiOn browse example\"])"
"agentops.init(\n",
" AGENTOPS_API_KEY, auto_start_session=False, default_tags=[\"MultiOn browse example\"]\n",
")"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion examples/multion/Sample_browsing_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
"metadata": {},
"outputs": [],
"source": [
"agentops.init(AGENTOPS_API_KEY, auto_start_session=False, default_tags=[\"MultiOn browse example\"])"
"agentops.init(\n",
" AGENTOPS_API_KEY, auto_start_session=False, default_tags=[\"MultiOn browse example\"]\n",
")"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions examples/recording-events.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@
"source": [
"from agentops import record_action\n",
"\n",
"\n",
"@record_action(\"add numbers\")\n",
"def add(x, y):\n",
" return x + y\n",
"\n",
"\n",
"add(2, 4)"
]
},
Expand Down

0 comments on commit b2174d8

Please sign in to comment.