-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated documentation with endpoint configuration details
- Loading branch information
1 parent
241e7f6
commit 1723dc3
Showing
6 changed files
with
258 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
export const ConfigTable = ({ | ||
columns, | ||
data, | ||
}: { | ||
columns: { key: string; title: string }[]; | ||
data: { [key: string]: string }[]; | ||
}) => { | ||
return ( | ||
<table className="border-separate border-spacing-2"> | ||
<thead> | ||
<tr> | ||
{columns.map((column) => ( | ||
<th className="" key={column.key}> | ||
{column.title} | ||
</th> | ||
))} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{data.map((row, index) => ( | ||
<tr key={index}> | ||
{columns.map((column) => ( | ||
<td className="align-top" key={column.key}> | ||
{column.key === "accepted_values" && row.av_as_code ? ( | ||
row[column.key].split(",").map((value, index) => ( | ||
<code | ||
key={index} | ||
className="text-xs mx-1 nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black nx-break-words nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] dark:nx-border-white/10 dark:nx-bg-white/10" | ||
> | ||
{value.trim()} | ||
</code> | ||
)) | ||
) : column.key === "property" ? ( | ||
<code className="text-sm nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black nx-break-words nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] dark:nx-border-white/10 dark:nx-bg-white/10"> | ||
{row[column.key]} | ||
</code> | ||
) : ( | ||
<div className="px-5 text-sm">{row[column.key]}</div> | ||
)} | ||
</td> | ||
))} | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
); | ||
}; | ||
|
||
ConfigTable.displayName = "ConfigTable"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { ConfigTable } from "./config-table"; | ||
|
||
export const ModelConfigTable = () => { | ||
const columns = [ | ||
{ key: "property", title: "Property" }, | ||
{ key: "accepted_values", title: "Accepted Values" }, | ||
{ key: "description", title: "Description" }, | ||
]; | ||
const data = [ | ||
{ | ||
property: "name", | ||
accepted_values: "gpt4o, gemini15flash", | ||
av_as_code: "true", | ||
description: | ||
"Name of the LLM model to use for the chat agent. If not provided, the default model for the agent type will be used.", | ||
}, | ||
{ | ||
property: "version", | ||
accepted_values: "Depends on the model being used", | ||
description: | ||
"Version of the LLM model to use for the chat agent. If not provided, the latest version of the model will be used.", | ||
}, | ||
{ | ||
property: "temperature", | ||
accepted_values: "0.0 to 1.0", | ||
description: | ||
"Controls the randomness of the output. A higher value will result in more diverse responses.", | ||
}, | ||
{ | ||
property: "maxOutputTokens", | ||
accepted_values: "Depends on the model being used", | ||
description: "Maximum number of tokens to generate.", | ||
}, | ||
{ | ||
property: "stopSequences", | ||
accepted_values: "Array of strings", | ||
description: "Sequences to stop generation at.", | ||
}, | ||
{ | ||
property: "safetySettings", | ||
accepted_values: "Object", | ||
description: "Safety settings for the model.", | ||
}, | ||
{ | ||
property: "size", | ||
accepted_values: "1024x1024, 1792x1024, 1024x1792", | ||
av_as_code: "true", | ||
description: "Size of the output image. Supported only by DALL-E models.", | ||
}, | ||
{ | ||
property: "style", | ||
accepted_values: "vivid, natural", | ||
av_as_code: "true", | ||
description: | ||
"Style of the output image. Supported only by DALL-E models.", | ||
}, | ||
{ | ||
property: "quality", | ||
accepted_values: "preview, full", | ||
av_as_code: "true", | ||
description: | ||
"Quality of the output image. Supported only by DALL-E models.", | ||
}, | ||
{ | ||
property: "response_format", | ||
accepted_values: "b64_json, url", | ||
av_as_code: "true", | ||
description: "Format of the response. Supported only by DALL-E models.", | ||
}, | ||
]; | ||
|
||
return <ConfigTable columns={columns} data={data} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { ConfigTable } from "./config-table"; | ||
|
||
export const RAGConfigTable = () => { | ||
const columns = [ | ||
{ key: "property", title: "Property" }, | ||
{ key: "accepted_values", title: "Accepted Values" }, | ||
{ key: "description", title: "Description" }, | ||
]; | ||
const data = [ | ||
{ | ||
property: "topic", | ||
accepted_values: "String", | ||
description: | ||
"Topic for RAG chat agent. Required if RAG is enabled. Queries are restricted to be relevant to the given topic so to prevent unintended use.", | ||
}, | ||
{ | ||
property: "enableRAG", | ||
accepted_values: "Boolean", | ||
description: | ||
"Enable RAG (Retrieval Augmented Generation) functionality for this endpoint. Must provide either a retriever method or the retriever configurations if set to true.", | ||
}, | ||
{ | ||
property: "retriever", | ||
accepted_values: "Function", | ||
description: | ||
"Method to retrieve documents for RAG. Can be obtained from the `getDataRetriever` method.", | ||
}, | ||
{ | ||
property: "retrieverConfig", | ||
accepted_values: "Object", | ||
description: | ||
"Configuration for the RAG retriever, for example, number of documents to retrieve, algorithm to use, etc.", | ||
}, | ||
]; | ||
|
||
return <ConfigTable columns={columns} data={data} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.