From 44a6666808515cb76f2b8c607e80eb5302479e41 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Wed, 31 Jul 2024 11:08:26 -0700 Subject: [PATCH 1/2] embed notebook html directly, not iframe --- docs/v1/examples/examples.mdx | 2 +- docs/v1/examples/langchain.mdx | 5 +- docs/v1/examples/multi_agent.mdx | 5 +- docs/v1/examples/multi_session.mdx | 5 +- docs/v1/examples/multion.mdx | 14 +- .../examples/notebooks/autogen/AgentChat.html | 146 +++++- .../examples/notebooks/autogen/MathAgent.html | 146 +++++- .../examples/notebooks/crew/job_posting.html | 146 +++++- docs/v1/examples/notebooks/generate.py | 3 +- .../notebooks/langchain_examples.html | 146 +++++- .../notebooks/multi_agent_example.html | 225 +++++++-- .../notebooks/multi_agent_groq_example.html | 471 ++++++++++++++++++ .../examples/notebooks/multi_session_llm.html | 146 +++++- .../multion/Autonomous_web_browsing.html | 146 +++++- .../multion/Sample_browsing_agent.html | 146 +++++- .../multion/Step_by_step_web_browsing.html | 146 +++++- .../multion/Webpage_data_retrieval.html | 146 +++++- docs/v1/examples/notebooks/openai-gpt.html | 146 +++++- .../examples/notebooks/recording-events.html | 146 +++++- docs/v1/examples/recording_events.mdx | 5 +- docs/v1/examples/simple_agent.mdx | 5 +- docs/v1/scripts/use_notebook.js | 19 + 22 files changed, 2300 insertions(+), 65 deletions(-) create mode 100644 docs/v1/examples/notebooks/multi_agent_groq_example.html create mode 100644 docs/v1/scripts/use_notebook.js diff --git a/docs/v1/examples/examples.mdx b/docs/v1/examples/examples.mdx index d57975be7..577657897 100644 --- a/docs/v1/examples/examples.mdx +++ b/docs/v1/examples/examples.mdx @@ -7,7 +7,7 @@ mode: "wide" ## Explore our example code to see AgentOps in action! - + Jupyter Notebook with sample code that you can run! Start here! diff --git a/docs/v1/examples/langchain.mdx b/docs/v1/examples/langchain.mdx index 68598c942..bd121bb0e 100644 --- a/docs/v1/examples/langchain.mdx +++ b/docs/v1/examples/langchain.mdx @@ -5,6 +5,5 @@ mode: "wide" --- _View Notebook on Github_ - - - +
+ \ No newline at end of file diff --git a/docs/v1/examples/multi_agent.mdx b/docs/v1/examples/multi_agent.mdx index 40db7cbfa..6ceb1deb9 100644 --- a/docs/v1/examples/multi_agent.mdx +++ b/docs/v1/examples/multi_agent.mdx @@ -5,6 +5,5 @@ mode: "wide" --- _View Notebook on Github_ - - - +
+ diff --git a/docs/v1/examples/multi_session.mdx b/docs/v1/examples/multi_session.mdx index 2742fc93a..a50a382a3 100644 --- a/docs/v1/examples/multi_session.mdx +++ b/docs/v1/examples/multi_session.mdx @@ -5,6 +5,5 @@ mode: "wide" --- _View Notebook on Github_ - - - +
+ \ No newline at end of file diff --git a/docs/v1/examples/multion.mdx b/docs/v1/examples/multion.mdx index c506b8958..f7a90a820 100644 --- a/docs/v1/examples/multion.mdx +++ b/docs/v1/examples/multion.mdx @@ -4,9 +4,11 @@ description: 'Tracking Multion usage with AgentOps' mode: "wide" --- - - - - - - +
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/docs/v1/examples/notebooks/autogen/AgentChat.html b/docs/v1/examples/notebooks/autogen/AgentChat.html index 0767c34de..b8910668c 100644 --- a/docs/v1/examples/notebooks/autogen/AgentChat.html +++ b/docs/v1/examples/notebooks/autogen/AgentChat.html @@ -7,6 +7,151 @@ AgentChat -
diff --git a/docs/v1/examples/notebooks/autogen/MathAgent.html b/docs/v1/examples/notebooks/autogen/MathAgent.html index 37caae7fe..9dbd9a76d 100644 --- a/docs/v1/examples/notebooks/autogen/MathAgent.html +++ b/docs/v1/examples/notebooks/autogen/MathAgent.html @@ -7,6 +7,151 @@ MathAgent -
diff --git a/docs/v1/examples/notebooks/crew/job_posting.html b/docs/v1/examples/notebooks/crew/job_posting.html index a03f65d50..e40e5dd6d 100644 --- a/docs/v1/examples/notebooks/crew/job_posting.html +++ b/docs/v1/examples/notebooks/crew/job_posting.html @@ -7,6 +7,151 @@ job_posting -
diff --git a/docs/v1/examples/notebooks/generate.py b/docs/v1/examples/notebooks/generate.py index ee60388a1..3119591bd 100644 --- a/docs/v1/examples/notebooks/generate.py +++ b/docs/v1/examples/notebooks/generate.py @@ -29,8 +29,9 @@ def convert_notebooks_to_html(source_dir: str, target_dir: str): ) # remove '.ipynb' and add '.html' # Convert notebook to HTML using pandoc + # -c https://app.agentops.ai/notebook_styles.css to add custom styles subprocess.check_call( - "pandoc {source_file} -s -o {html_target_file} -c https://app.agentops.ai/notebook_styles.css && " + "pandoc {source_file} -s -o {html_target_file} && " "{{ echo ''; cat {html_target_file}; }} > temp.md && mv temp.md {html_target_file}".format( source_file=source_file, html_target_file=html_target_file ), diff --git a/docs/v1/examples/notebooks/langchain_examples.html b/docs/v1/examples/notebooks/langchain_examples.html index 9712fc7d2..0b401431f 100644 --- a/docs/v1/examples/notebooks/langchain_examples.html +++ b/docs/v1/examples/notebooks/langchain_examples.html @@ -7,6 +7,151 @@ langchain_examples -
diff --git a/docs/v1/examples/notebooks/multi_agent_example.html b/docs/v1/examples/notebooks/multi_agent_example.html index 941fa0e06..41d60817f 100644 --- a/docs/v1/examples/notebooks/multi_agent_example.html +++ b/docs/v1/examples/notebooks/multi_agent_example.html @@ -7,6 +7,151 @@ multi_agent_example - -
+

Multi-Agent Support

This is an example implementation of tracking events from two separate agents

-
+
import agentops
 from agentops.agent import track_agent
@@ -106,7 +252,8 @@ 

Multi-Agent Support

from IPython.display import display, Markdown
-
+
load_dotenv()
 OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "<your_openai_key>")
@@ -115,15 +262,18 @@ 

Multi-Agent Support

level=logging.DEBUG ) # this will let us see that calls are assigned to an agent
-
+
agentops.init(AGENTOPS_API_KEY, tags=["multi-agent-notebook"])
 openai_client = OpenAI(api_key=OPENAI_API_KEY)
-
+

Now lets create a few agents!

-
+
@track_agent(name="qa")
 class QaAgent:
@@ -158,53 +308,66 @@ 

Multi-Agent Support

) return res.choices[0].message.content
-
+
qa = QaAgent()
 engineer = EngineerAgent()
-
+

Now we have our agents and we tagged them with the @track_agent decorator. Any LLM calls that go through this class will now be tagged as agent calls in AgentOps.

Lets use these agents!

-
+
display(Markdown("```python\n" + generated_func + "\n```"))
+class="sourceCode python">generated_func = engineer.completion("python function to test prime number")
-
+
generated_test = qa.completion(
-    "Write a python unit test that test the following function: \n " + generated_func
-)
+class="sourceCode python">display(Markdown("```python\n" + generated_func + "\n```"))
-
+
display(Markdown("```python\n" + generated_test + "\n```"))
+class="sourceCode python">generated_test = qa.completion( + "Write a python unit test that test the following function: \n " + generated_func +)
+
+
+
display(Markdown("```python\n" + generated_test + "\n```"))
-
+

Perfect! It generated the code as expected, and in the DEBUG logs, you can see that the calls were made by agents named "engineer" and "qa"!

-
+

Lets verify one more thing! If we make an LLM call outside of the context of a tracked agent, we want to make sure it gets assigned to the Default Agent.

-
-
res = openai_client.chat.completions.create(
-    model="gpt-3.5-turbo",
-    messages=[
-        {"role": "system", "content": "You are not a tracked agent"},
-        {"role": "user", "content": "Say hello"},
-    ],
-)
-res.choices[0].message.content
-
-
+
+
res = openai_client.chat.completions.create(
+    model="gpt-3.5-turbo",
+    messages=[
+        {"role": "system", "content": "You are not a tracked agent"},
+        {"role": "user", "content": "Say hello"},
+    ],
+)
+res.choices[0].message.content
+
+

You'll notice that we didn't log an agent name, so the AgentOps backend will assign it to the Default Agent for the session!

diff --git a/docs/v1/examples/notebooks/multi_agent_groq_example.html b/docs/v1/examples/notebooks/multi_agent_groq_example.html new file mode 100644 index 000000000..efb4620f4 --- /dev/null +++ b/docs/v1/examples/notebooks/multi_agent_groq_example.html @@ -0,0 +1,471 @@ + + + + + + + + multi_agent_groq_example + + + +
+

Multi-Agent Support

+

This is an example implementation of tracking events from two +separate agents

+
+
+
import agentops
+from agentops.agent import track_agent
+from dotenv import load_dotenv
+import os
+from groq import Groq
+import logging
+
+from IPython.display import display, Markdown
+
+
+
load_dotenv()
+GROQ_API_KEY = os.getenv("GROQ_API_KEY", "<your_openai_key>")
+AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY", "<your_agentops_key>")
+logging.basicConfig(
+    level=logging.DEBUG
+)  # this will let us see that calls are assigned to an agent
+
+
+
agentops.init(AGENTOPS_API_KEY, tags=["multi-agent-groq-notebook"])
+groq_client = Groq(api_key=GROQ_API_KEY)
+
+
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.agentops.ai:443
+DEBUG:urllib3.connectionpool:https://api.agentops.ai:443 "POST /v2/create_session HTTP/11" 200 204
+🖇 AgentOps: Session Replay: https://app.agentops.ai/drilldown?session_id=892edb44-774d-4f52-a9b8-4d4eada5b434
+INFO:agentops:Session Replay: https://app.agentops.ai/drilldown?session_id=892edb44-774d-4f52-a9b8-4d4eada5b434
+DEBUG:httpx:load_ssl_context verify=True cert=None trust_env=True http2=False
+DEBUG:httpx:load_verify_locations cafile='/Users/manu_suryavansh/miniforge3/envs/agentsops_dev/lib/python3.11/site-packages/certifi/cacert.pem'
+DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.agentops.ai:443
+DEBUG:urllib3.connectionpool:https://api.agentops.ai:443 "POST /v2/create_events HTTP/11" 200 9
+
+
+
+
+

Now lets create a few agents!

+
+
+
@track_agent(name="qa")
+class QaAgent:
+    def completion(self, prompt: str):
+        res = groq_client.chat.completions.create(
+            model="llama3-70b-8192",
+            messages=[
+                {
+                    "role": "system",
+                    "content": "You are a qa engineer and only output python code, no markdown tags.",
+                },
+                {"role": "user", "content": prompt},
+            ],
+            temperature=0.5,
+        )
+        return res.choices[0].message.content
+
+
+@track_agent(name="engineer")
+class EngineerAgent:
+    def completion(self, prompt: str):
+        res = groq_client.chat.completions.create(
+            model="llama3-70b-8192",
+            messages=[
+                {
+                    "role": "system",
+                    "content": "You are a software engineer and only output python code, no markdown tags.",
+                },
+                {"role": "user", "content": prompt},
+            ],
+            temperature=0.5,
+        )
+        return res.choices[0].message.content
+
+
+
qa = QaAgent()
+engineer = EngineerAgent()
+
+
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.agentops.ai:443
+DEBUG:urllib3.connectionpool:https://api.agentops.ai:443 "POST /v2/create_agent HTTP/11" 200 9
+DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.agentops.ai:443
+DEBUG:urllib3.connectionpool:https://api.agentops.ai:443 "POST /v2/create_agent HTTP/11" 200 9
+
+
+
+
+

Now we have our agents and we tagged them with the +@track_agent decorator. Any LLM calls that go through this +class will now be tagged as agent calls in AgentOps.

+

Lets use these agents!

+
+
+
generated_func = engineer.completion("python function to test prime number")
+
+
DEBUG:groq._base_client:Request options: {'method': 'post', 'url': '/openai/v1/chat/completions', 'files': None, 'json_data': {'messages': [{'role': 'system', 'content': 'You are a software engineer and only output python code, no markdown tags.'}, {'role': 'user', 'content': 'python function to test prime number'}], 'model': 'llama3-70b-8192', 'temperature': 0.5}}
+DEBUG:groq._base_client:Sending HTTP Request: POST https://api.groq.com/openai/v1/chat/completions
+DEBUG:httpcore.connection:connect_tcp.started host='api.groq.com' port=443 local_address=None timeout=5.0 socket_options=None
+DEBUG:httpcore.connection:connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x108dc1010>
+DEBUG:httpcore.connection:start_tls.started ssl_context=<ssl.SSLContext object at 0x10a6e4d40> server_hostname='api.groq.com' timeout=5.0
+DEBUG:httpcore.connection:start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x1098df650>
+DEBUG:httpcore.http11:send_request_headers.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:send_request_headers.complete
+DEBUG:httpcore.http11:send_request_body.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:send_request_body.complete
+DEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Sun, 21 Jul 2024 05:55:22 GMT'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'private, max-age=0, no-store, no-cache, must-revalidate'), (b'vary', b'Origin'), (b'x-ratelimit-limit-requests', b'50000'), (b'x-ratelimit-limit-tokens', b'30000'), (b'x-ratelimit-remaining-requests', b'49999'), (b'x-ratelimit-remaining-tokens', b'29963'), (b'x-ratelimit-reset-requests', b'1.728s'), (b'x-ratelimit-reset-tokens', b'74ms'), (b'x-request-id', b'req_01j39xqscce4dbg5h08vrftym2'), (b'via', b'1.1 google'), (b'alt-svc', b'h3=":443"; ma=86400'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Set-Cookie', b'__cf_bm=vDBNcm.4NuP7B9MJyHy7WVBS7CVF.SyvXXsf7ZXdpT8-1721541322-1.0.1.1-QRg7ZBBgC845heu3O2ZfJySw1nqhlOCwpF29NmD1H9xnMUNFOstcyHCHabYKSBZXq6iNGbkYaId01XpPYOfuWQ; path=/; expires=Sun, 21-Jul-24 06:25:22 GMT; domain=.groq.com; HttpOnly; Secure; SameSite=None'), (b'Server', b'cloudflare'), (b'CF-RAY', b'8a68f10f2ba89652-SJC'), (b'Content-Encoding', b'gzip')])
+INFO:httpx:HTTP Request: POST https://api.groq.com/openai/v1/chat/completions "HTTP/1.1 200 OK"
+DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:receive_response_body.complete
+DEBUG:httpcore.http11:response_closed.started
+DEBUG:httpcore.http11:response_closed.complete
+DEBUG:groq._base_client:HTTP Response: POST https://api.groq.com/openai/v1/chat/completions "200 OK" Headers({'date': 'Sun, 21 Jul 2024 05:55:22 GMT', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'connection': 'keep-alive', 'cache-control': 'private, max-age=0, no-store, no-cache, must-revalidate', 'vary': 'Origin', 'x-ratelimit-limit-requests': '50000', 'x-ratelimit-limit-tokens': '30000', 'x-ratelimit-remaining-requests': '49999', 'x-ratelimit-remaining-tokens': '29963', 'x-ratelimit-reset-requests': '1.728s', 'x-ratelimit-reset-tokens': '74ms', 'x-request-id': 'req_01j39xqscce4dbg5h08vrftym2', 'via': '1.1 google', 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'set-cookie': '__cf_bm=vDBNcm.4NuP7B9MJyHy7WVBS7CVF.SyvXXsf7ZXdpT8-1721541322-1.0.1.1-QRg7ZBBgC845heu3O2ZfJySw1nqhlOCwpF29NmD1H9xnMUNFOstcyHCHabYKSBZXq6iNGbkYaId01XpPYOfuWQ; path=/; expires=Sun, 21-Jul-24 06:25:22 GMT; domain=.groq.com; HttpOnly; Secure; SameSite=None', 'server': 'cloudflare', 'cf-ray': '8a68f10f2ba89652-SJC', 'content-encoding': 'gzip'})
+
+
+
+
+
display(Markdown("```python\n" + generated_func + "\n```"))
+
+
<IPython.core.display.Markdown object>
+
+
+
+
generated_test = qa.completion(
+    "Write a python unit test that test the following function: \n " + generated_func
+)
+
+
DEBUG:groq._base_client:Request options: {'method': 'post', 'url': '/openai/v1/chat/completions', 'files': None, 'json_data': {'messages': [{'role': 'system', 'content': 'You are a qa engineer and only output python code, no markdown tags.'}, {'role': 'user', 'content': 'Write a python unit test that test the following function: \n def is_prime(n):\n    if n <= 1:\n        return False\n    if n == 2:\n        return True\n    if n % 2 == 0:\n        return False\n    max_divisor = int(n**0.5) + 1\n    for d in range(3, max_divisor, 2):\n        if n % d == 0:\n            return False\n    return True'}], 'model': 'llama3-70b-8192', 'temperature': 0.5}}
+DEBUG:groq._base_client:Sending HTTP Request: POST https://api.groq.com/openai/v1/chat/completions
+DEBUG:httpcore.http11:send_request_headers.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:send_request_headers.complete
+DEBUG:httpcore.http11:send_request_body.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:send_request_body.complete
+DEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Sun, 21 Jul 2024 05:55:23 GMT'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'private, max-age=0, no-store, no-cache, must-revalidate'), (b'vary', b'Origin'), (b'x-ratelimit-limit-requests', b'50000'), (b'x-ratelimit-limit-tokens', b'30000'), (b'x-ratelimit-remaining-requests', b'49998'), (b'x-ratelimit-remaining-tokens', b'29845'), (b'x-ratelimit-reset-requests', b'2.960999999s'), (b'x-ratelimit-reset-tokens', b'310ms'), (b'x-request-id', b'req_01j39xqsy5fxgth4w9q6r24h9w'), (b'via', b'1.1 google'), (b'alt-svc', b'h3=":443"; ma=86400'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'8a68f112be2c9652-SJC'), (b'Content-Encoding', b'gzip')])
+INFO:httpx:HTTP Request: POST https://api.groq.com/openai/v1/chat/completions "HTTP/1.1 200 OK"
+DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:receive_response_body.complete
+DEBUG:httpcore.http11:response_closed.started
+DEBUG:httpcore.http11:response_closed.complete
+DEBUG:groq._base_client:HTTP Response: POST https://api.groq.com/openai/v1/chat/completions "200 OK" Headers({'date': 'Sun, 21 Jul 2024 05:55:23 GMT', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'connection': 'keep-alive', 'cache-control': 'private, max-age=0, no-store, no-cache, must-revalidate', 'vary': 'Origin', 'x-ratelimit-limit-requests': '50000', 'x-ratelimit-limit-tokens': '30000', 'x-ratelimit-remaining-requests': '49998', 'x-ratelimit-remaining-tokens': '29845', 'x-ratelimit-reset-requests': '2.960999999s', 'x-ratelimit-reset-tokens': '310ms', 'x-request-id': 'req_01j39xqsy5fxgth4w9q6r24h9w', 'via': '1.1 google', 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'server': 'cloudflare', 'cf-ray': '8a68f112be2c9652-SJC', 'content-encoding': 'gzip'})
+
+
+
+
+
display(Markdown("```python\n" + generated_test + "\n```"))
+
+
<IPython.core.display.Markdown object>
+
+
+
+

Perfect! It generated the code as expected, and in the DEBUG logs, +you can see that the calls were made by agents named "engineer" and +"qa"!

+
+
+

Lets verify one more thing! If we make an LLM call outside of the +context of a tracked agent, we want to make sure it gets assigned to the +Default Agent.

+
+
+
res = groq_client.chat.completions.create(
+    model="llama3-70b-8192",
+    messages=[
+        {"role": "system", "content": "You are not a tracked agent"},
+        {"role": "user", "content": "Say hello"},
+    ],
+)
+res.choices[0].message.content
+
+
DEBUG:groq._base_client:Request options: {'method': 'post', 'url': '/openai/v1/chat/completions', 'files': None, 'json_data': {'messages': [{'role': 'system', 'content': 'You are not a tracked agent'}, {'role': 'user', 'content': 'Say hello'}], 'model': 'llama3-70b-8192'}}
+DEBUG:groq._base_client:Sending HTTP Request: POST https://api.groq.com/openai/v1/chat/completions
+DEBUG:httpcore.http11:send_request_headers.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:send_request_headers.complete
+DEBUG:httpcore.http11:send_request_body.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:send_request_body.complete
+DEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Sun, 21 Jul 2024 05:55:24 GMT'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'private, max-age=0, no-store, no-cache, must-revalidate'), (b'vary', b'Origin'), (b'x-ratelimit-limit-requests', b'50000'), (b'x-ratelimit-limit-tokens', b'30000'), (b'x-ratelimit-remaining-requests', b'49998'), (b'x-ratelimit-remaining-tokens', b'29982'), (b'x-ratelimit-reset-requests', b'3.318s'), (b'x-ratelimit-reset-tokens', b'36ms'), (b'x-request-id', b'req_01j39xqvrgem4bfd3gqybths6c'), (b'via', b'1.1 google'), (b'alt-svc', b'h3=":443"; ma=86400'), (b'CF-Cache-Status', b'DYNAMIC'), (b'Server', b'cloudflare'), (b'CF-RAY', b'8a68f11e6dd59652-SJC'), (b'Content-Encoding', b'gzip')])
+INFO:httpx:HTTP Request: POST https://api.groq.com/openai/v1/chat/completions "HTTP/1.1 200 OK"
+DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
+DEBUG:httpcore.http11:receive_response_body.complete
+DEBUG:httpcore.http11:response_closed.started
+DEBUG:httpcore.http11:response_closed.complete
+DEBUG:groq._base_client:HTTP Response: POST https://api.groq.com/openai/v1/chat/completions "200 OK" Headers({'date': 'Sun, 21 Jul 2024 05:55:24 GMT', 'content-type': 'application/json', 'transfer-encoding': 'chunked', 'connection': 'keep-alive', 'cache-control': 'private, max-age=0, no-store, no-cache, must-revalidate', 'vary': 'Origin', 'x-ratelimit-limit-requests': '50000', 'x-ratelimit-limit-tokens': '30000', 'x-ratelimit-remaining-requests': '49998', 'x-ratelimit-remaining-tokens': '29982', 'x-ratelimit-reset-requests': '3.318s', 'x-ratelimit-reset-tokens': '36ms', 'x-request-id': 'req_01j39xqvrgem4bfd3gqybths6c', 'via': '1.1 google', 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'server': 'cloudflare', 'cf-ray': '8a68f11e6dd59652-SJC', 'content-encoding': 'gzip'})
+
+
+
+
'Hello!'
+
+
+
+

You'll notice that we didn't log an agent name, so the AgentOps +backend will assign it to the Default Agent for the session!

+
+
+
+
+ + diff --git a/docs/v1/examples/notebooks/multi_session_llm.html b/docs/v1/examples/notebooks/multi_session_llm.html index f9890d6ea..e87df74ae 100644 --- a/docs/v1/examples/notebooks/multi_session_llm.html +++ b/docs/v1/examples/notebooks/multi_session_llm.html @@ -7,6 +7,151 @@ multi_session_llm -
diff --git a/docs/v1/examples/notebooks/multion/Autonomous_web_browsing.html b/docs/v1/examples/notebooks/multion/Autonomous_web_browsing.html index 5475e98af..8e581e8c0 100644 --- a/docs/v1/examples/notebooks/multion/Autonomous_web_browsing.html +++ b/docs/v1/examples/notebooks/multion/Autonomous_web_browsing.html @@ -7,6 +7,151 @@ Autonomous_web_browsing -
diff --git a/docs/v1/examples/notebooks/multion/Sample_browsing_agent.html b/docs/v1/examples/notebooks/multion/Sample_browsing_agent.html index ba664131c..44d16c78e 100644 --- a/docs/v1/examples/notebooks/multion/Sample_browsing_agent.html +++ b/docs/v1/examples/notebooks/multion/Sample_browsing_agent.html @@ -7,6 +7,151 @@ Sample_browsing_agent -
diff --git a/docs/v1/examples/notebooks/multion/Step_by_step_web_browsing.html b/docs/v1/examples/notebooks/multion/Step_by_step_web_browsing.html index 0b64d5ae3..09a3f8300 100644 --- a/docs/v1/examples/notebooks/multion/Step_by_step_web_browsing.html +++ b/docs/v1/examples/notebooks/multion/Step_by_step_web_browsing.html @@ -7,6 +7,151 @@ Step_by_step_web_browsing -
diff --git a/docs/v1/examples/notebooks/multion/Webpage_data_retrieval.html b/docs/v1/examples/notebooks/multion/Webpage_data_retrieval.html index ea5f8f99e..ea3a87d73 100644 --- a/docs/v1/examples/notebooks/multion/Webpage_data_retrieval.html +++ b/docs/v1/examples/notebooks/multion/Webpage_data_retrieval.html @@ -7,6 +7,151 @@ Webpage_data_retrieval -
diff --git a/docs/v1/examples/notebooks/openai-gpt.html b/docs/v1/examples/notebooks/openai-gpt.html index eb04650ab..51a79bdd4 100644 --- a/docs/v1/examples/notebooks/openai-gpt.html +++ b/docs/v1/examples/notebooks/openai-gpt.html @@ -7,6 +7,151 @@ openai-gpt -
diff --git a/docs/v1/examples/notebooks/recording-events.html b/docs/v1/examples/notebooks/recording-events.html index fe16e3089..aa7b5b7d6 100644 --- a/docs/v1/examples/notebooks/recording-events.html +++ b/docs/v1/examples/notebooks/recording-events.html @@ -7,6 +7,151 @@ recording-events -
diff --git a/docs/v1/examples/recording_events.mdx b/docs/v1/examples/recording_events.mdx index 094454383..237735217 100644 --- a/docs/v1/examples/recording_events.mdx +++ b/docs/v1/examples/recording_events.mdx @@ -5,6 +5,5 @@ mode: "wide" --- _View Notebook on Github_ - - - +
+ \ No newline at end of file diff --git a/docs/v1/examples/simple_agent.mdx b/docs/v1/examples/simple_agent.mdx index 01d01065c..c5f599cf7 100644 --- a/docs/v1/examples/simple_agent.mdx +++ b/docs/v1/examples/simple_agent.mdx @@ -5,6 +5,5 @@ mode: "wide" --- _View Notebook on Github_ - - - +
+ diff --git a/docs/v1/scripts/use_notebook.js b/docs/v1/scripts/use_notebook.js new file mode 100644 index 000000000..1edcd5d05 --- /dev/null +++ b/docs/v1/scripts/use_notebook.js @@ -0,0 +1,19 @@ +// Function to load content from another HTML file +async function loadContent(div_element) { + try { + const fileName = div_element.getAttribute('data-content-file'); + const response = await fetch(fileName); + if (!response.ok) throw new Error('Network response was not ok'); + div_element.innerHTML = await response.text(); + } catch (error) { + console.error('Failed to load content:', error); + } +} + +// Load content when the page is fully loaded +window.onload = function() { + const divs = document.querySelectorAll('div[data-content-file]'); + divs.forEach(div => { + loadContent(div); + }); +}; \ No newline at end of file From 39df950fd91049241db2d5bde9c298a5c3dfc166 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Wed, 31 Jul 2024 12:42:49 -0700 Subject: [PATCH 2/2] delete iframe script --- docs/v1/scripts/full_iframe.js | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 docs/v1/scripts/full_iframe.js diff --git a/docs/v1/scripts/full_iframe.js b/docs/v1/scripts/full_iframe.js deleted file mode 100644 index e08da43f1..000000000 --- a/docs/v1/scripts/full_iframe.js +++ /dev/null @@ -1,15 +0,0 @@ -window.addEventListener('load', function() { - let iframes = document.getElementsByTagName('iframe'); - for (let i = 0; i < iframes.length; ++i) { - let iframe = iframes[i]; - let body = iframe.contentDocument.body; - - iframe.style.height = body.scrollHeight + 100 + 'px'; - iframe.style.width = '95%'; - iframe.style.borderRadius = '15px'; - iframe.style.boxShadow = '0px 2px 15px rgba(0, 0, 0, 0.1)'; - iframe.style.marginLeft = '15px'; - iframe.style.padding = '5px'; - iframe.style.marginBottom = '25px' - } -}); \ No newline at end of file