clarifai-nodejs / Exports / RAG
Class: RAG
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new RAG(«destructured»
): RAG
Parameters
Name | Type |
---|---|
«destructured» | RAGConfig |
Returns
Defined in
Properties
app
• app: App
Defined in
authConfig
• Private
authConfig: AuthConfig
Defined in
promptWorkflow
• promptWorkflow: Workflow
Defined in
Methods
chat
▸ chat(«destructured»
): Promise
<Message
[]>
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› clientManageState? | boolean | true |
› messages | Message [] | undefined |
Returns
Promise
<Message
[]>
Defined in
upload
▸ upload(«destructured»
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› batchSize? | number | 128 |
› chunkOverlap? | number | 200 |
› chunkSize? | number | 1024 |
› datasetId? | string | undefined |
› filePath? | string | undefined |
› folderPath? | string | undefined |
› metadata? | Record <string , JavaScriptValue > | undefined |
› url? | string | undefined |
Returns
Promise
<void
>
Defined in
validateInputs
▸ validateInputs(workflowUrl?
, workflow?
, authConfig?
): void
Parameters
Name | Type |
---|---|
workflowUrl? | string |
workflow? | Workflow |
authConfig? | AuthConfig | UrlAuthConfig |
Returns
void
Defined in
setup
▸ setup(«destructured»
): Promise
<RAG
>
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› appUrl? | `${string}://${string}/${string}/${string}` | undefined |
› authConfig? | AuthAppConfig | Omit <AuthConfig , "appId" > & { appId? : undefined } | undefined |
› baseWorkflow? | string | "Text" |
› llmUrl? | ClarifaiUrl | "https://clarifai.com/mistralai/completion/models/mistral-7B-Instruct" |
› maxResults? | number | 5 |
› minScore? | number | 0.95 |
› promptTemplate? | string | DEFAULT_RAG_PROMPT_TEMPLATE |
› workflowId? | string | undefined |
› workflowYamlFilename? | string | "prompter_wf.yaml" |
Returns
Promise
<RAG
>