From 0467aeeda63ad6c7451a1e7bed9f8eb4d8f1fe32 Mon Sep 17 00:00:00 2001 From: Soo Date: Tue, 25 Jun 2024 16:42:14 -0700 Subject: [PATCH] Test commit --- docs/snippets/github-stars.js | 17 +++++++++++++++++ docs/v1/quickstart.mdx | 22 +++------------------- 2 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 docs/snippets/github-stars.js diff --git a/docs/snippets/github-stars.js b/docs/snippets/github-stars.js new file mode 100644 index 000000000..2fcc8af93 --- /dev/null +++ b/docs/snippets/github-stars.js @@ -0,0 +1,17 @@ +import React, { useEffect, useState } from 'react'; + +export function GithubStars() { + const [stars, setStars] = useState(null); + + useEffect(() => { + async function fetchStars() { + const response = await fetch('https://api.github.com/repos/AgentOps-AI/agentops'); + const data = await response.json(); + const stars = Math.ceil(data.stargazers_count / 1000) * 1000; + setStars(stars.toLocaleString()); + } + fetchStars(); + }, []); + + return

{stars ? `${stars}th` : '2,000th'}

; +} \ No newline at end of file diff --git a/docs/v1/quickstart.mdx b/docs/v1/quickstart.mdx index 7a075c830..5c77ee8e3 100644 --- a/docs/v1/quickstart.mdx +++ b/docs/v1/quickstart.mdx @@ -2,24 +2,8 @@ title: "Quickstart" description: "Start using AgentOps with just 2 lines of code" --- -import SupportedModels from '/snippets/supported-models.mdx' -import { useEffect, useState } from 'react'; - -function GitHubStars() { - const [stars, setStars] = useState(null); - - useEffect(() => { - async function fetchStars() { - const response = await fetch('https://api.github.com/repos/AgentOps-AI/agentops'); - const data = await response.json(); - const stars = Math.ceil(data.stargazers_count / 1000) * 1000; - setStars(stars.toLocaleString()); - } - fetchStars(); - }, []); - - return stars ? `${stars}th` : '2,000th'; -} +import { GithubStars } from '/snippets/github-stars' +import SupportedModels from '/snippets/supported-models.mdx' @@ -31,7 +15,7 @@ function GitHubStars() { poetry add agentops ``` - [Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our 2,000th 😊) + [Give us a star](https://github.com/AgentOps-AI/agentops) on GitHub while you're at it (you may be our 😊)