From 91e6fd14fcb061aebaf9d706c717db3c5bbca51c Mon Sep 17 00:00:00 2001 From: cdeng65 Date: Fri, 29 Sep 2023 03:36:15 -0400 Subject: [PATCH 1/2] refined docs --- src/pages/docs.tsx | 3 + src/screens/AnonDocs/Docs.tsx | 264 +++++++++++++++++++++++++++++++++ src/screens/AnonDocs/index.tsx | 3 + 3 files changed, 270 insertions(+) create mode 100644 src/pages/docs.tsx create mode 100644 src/screens/AnonDocs/Docs.tsx create mode 100644 src/screens/AnonDocs/index.tsx diff --git a/src/pages/docs.tsx b/src/pages/docs.tsx new file mode 100644 index 0000000..b14fb6d --- /dev/null +++ b/src/pages/docs.tsx @@ -0,0 +1,3 @@ +import Documentation from "../screens/AnonDocs"; + +export default Documentation; diff --git a/src/screens/AnonDocs/Docs.tsx b/src/screens/AnonDocs/Docs.tsx new file mode 100644 index 0000000..6f0bfa4 --- /dev/null +++ b/src/screens/AnonDocs/Docs.tsx @@ -0,0 +1,264 @@ +import React from "react"; +import { + Box, + Flex, + Link, + Heading, + Text, + Container, + Image, + Icon, + Code, +} from "@chakra-ui/react"; +import { FaArrowCircleRight } from "react-icons/fa"; + +const Documentation: React.FC = () => { + return ( + + + + + + Advanced Reasoning Benchmark + + + + + + Try out our interface! + + + + + + + + + + + API Documentation + + + We provide a simple API to access the Advanced Reasoning Benchmark + (ARB). The API currently supports standard HTTP GET requests. + + + + API Calls + + + We have three different types of API calls for retrieving problems. + See{" "} + + here + {" "} + and select ARB API server as the mock server to see what the outputs + look like. + + + + Get problem by category: + + + You can retrieve all the problems in a particular subject area by the + following API call. Acceptable values for `category` are `law`, + `math`, `mcatReading`, etc. + + + https://arb.duckai.org/api/lib/{"{category}"} + + + Math Numerical: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/math") +
+ data = response.json() +
+
+ + + Math Symbolic: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/testSplit/math/symbolic") +
+ data = response.json() +
+
+ + + Math Proofs: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/testSplit/math/proof") +
+ data = response.json() +
+
+ + + + Physics Numerical: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/physics/val") +
+ data = response.json() +
+
+ + + Physics Symbolic: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/testSplit/physics/val") +
+ data = response.json() +
+
+ + + Law: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/law") +
+ data = response.json() +
+
+ + + MCAT Reading: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/mcatReading") +
+ data = response.json() +
+
+ + + Get a specific problem by id within category + + + + https://arb.duckai.org/api/lib/{"{category}"}/{"{id}"} + + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/math/1234") +
+ problem = response.json() +
+
+ + + Get problem by category variation (e.g. img vs val) + + + + https://arb.duckai.org/api/lib/{"{category}"}/{"{variation}"} + + + + Physics Numerical w/ Images: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/physics_numerical/img") +
+ variation_data = response.json() +
+
+ + Physics Symbolic w/ Images: + + + + import requests +
+ response = + requests.get("https://arb.duckai.org/api/lib/testSplit/physics/img") +
+ variation_data = response.json() +
+
+
+ + + + + Copyright © 2023 The ARB Team + + + +
+ ); +}; + +export default Documentation; diff --git a/src/screens/AnonDocs/index.tsx b/src/screens/AnonDocs/index.tsx new file mode 100644 index 0000000..ec49da7 --- /dev/null +++ b/src/screens/AnonDocs/index.tsx @@ -0,0 +1,3 @@ +import Documentation from "./Docs"; + +export default Documentation; From aad586eb0ab1f861e36391344e6e8d7c678d711c Mon Sep 17 00:00:00 2001 From: cdeng65 Date: Fri, 29 Sep 2023 03:36:57 -0400 Subject: [PATCH 2/2] lint and format --- src/screens/AnonDocs/Docs.tsx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/screens/AnonDocs/Docs.tsx b/src/screens/AnonDocs/Docs.tsx index 6f0bfa4..a11cfb7 100644 --- a/src/screens/AnonDocs/Docs.tsx +++ b/src/screens/AnonDocs/Docs.tsx @@ -31,20 +31,9 @@ const Documentation: React.FC = () => { flexGrow={1} textAlign={{ base: "center", md: "left" }} > - - - Advanced Reasoning Benchmark - - - - - - Try out our interface! - - - - - + + Advanced Reasoning Benchmark + @@ -126,7 +115,6 @@ const Documentation: React.FC = () => { - Physics Numerical: