Skip to content

Commit

Permalink
fix(docs): fix issues in api section (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamgambhir97 authored Sep 10, 2024
1 parent 153f258 commit 943acc8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
54 changes: 26 additions & 28 deletions components/api-endpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,32 @@ const CurlCodeTab: React.FC<{
curl \\
-X ${method} \\
${
isBearerTokenRequired ? `-H Authorization: bearer <your token here> \\\n` : ""
isBearerTokenRequired
? `-H Authorization: bearer <your token here> -H 'Content-Type: application/json' \\\n`
: ""
}${url}`;

if (samplePayload) {
code += ` \\\n -d '${JSON.stringify(samplePayload)}'`;
}

return (
<Pre filename="bash" hasCopyCode={true} className="nx-pre-code">
{code.split("\n").map((line) => {
return (
<>
{line}
<br />
</>
);
})}
<Pre
filename="bash"
data-lanuage="curl"
hasCopyCode={true}
className="nx-pre-code"
>
<Code data-lanuage="bash" data-theme="default">
{code.split("\n").map((line) => {
return (
<>
{line}
<br />
</>
);
})}
</Code>
</Pre>
);
};
Expand Down Expand Up @@ -432,7 +441,7 @@ export const ApiEndpointRequestResponse: React.FC<{
</p>
<Tooltip>
<p className="nx-text-sm nx-font-bold nx-text-gray-800 nx-pb-1">
To access your Agentverse account, please follow these
To access your Agentverse API key, please follow these
steps:
</p>
<ol className="nx-text-xs nx-leading-4 nx-text-gray-600 nx-pb-3 nx-list-decimal nx-mt-2 nx-p-[10px]">
Expand All @@ -448,28 +457,17 @@ export const ApiEndpointRequestResponse: React.FC<{
account.
</li>
<li>
Once logged in, open the developer tools in your web
browser.
</li>
<li>
In the developer tools, navigate to the{" "}
<b>Applications</b> tab
</li>
<li>
Within the Applications tab, you will find a section for{" "}
<b>cookies</b>.
</li>
<li>
Look for a specific cookie named <b>Fauna</b> Name. This
cookie contains your Fauna token
Once logged in, click on your profile icon in the
top-right corner.
</li>
<li>
Copy the value of the <b>Fauna</b> token from the
cookie.
In the dropdown menu, select <b>API Keys</b>.
</li>
<li>
Paste the copied <b>Fauna</b> token here.
If you haven`t generated an API key yet, click on{" "}
<b>Create New API Key</b>.
</li>
<li>Copy the generated API key and paste it here.</li>
</ol>
</Tooltip>
</div>
Expand Down
8 changes: 4 additions & 4 deletions pages/apis/ai-engine/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Mind that: to access these APIs, user must be **authenticated** and have the **c
samplePayload={{
email: "your_email_address",
requestedModel: "talkative-01",
functionGroup: "ef6937d9-c086-4785-8bb1-748680821714"
functionGroup: "12c8601c-cccd-42de-a5f1-7eab76ae3121"
}}
responses={[
{
Expand All @@ -90,7 +90,7 @@ Mind that: to access these APIs, user must be **authenticated** and have the **c
messages: [],
model: "talkative-01",
remaining_tokens: 10000000,
function_group: "ef6937d9-c086-4785-8bb1-748680821714"
function_group: "12c8601c-cccd-42de-a5f1-7eab76ae3121"
},
]}
responseDescription="Returns the newly created Session object"
Expand All @@ -110,7 +110,7 @@ Mind that: to access these APIs, user must be **authenticated** and have the **c
num_messages: 0,
last_message_timestamp: null,
messages: [],
function_group: "ef6937d9-c086-4785-8bb1-748680821714",
function_group: "12c8601c-cccd-42de-a5f1-7eab76ae3121",
model: "talkative-01",
remaining_tokens: 9999099,
},
Expand All @@ -120,7 +120,7 @@ Mind that: to access these APIs, user must be **authenticated** and have the **c
num_messages: 0,
last_message_timestamp: null,
messages: [],
function_group: "ef6937d9-c086-4785-8bb1-748680821714",
function_group: "12c8601c-cccd-42de-a5f1-7eab76ae3121",
model: "talkative-01",
remaining_tokens: 9999099,
},
Expand Down

0 comments on commit 943acc8

Please sign in to comment.