Preparing search index...
The search index is not available
llmclient
llmclient
RAG
Class RAG
Hierarchy (
view full
)
Program
<
{
question
:
string
;
}
,
{
answer
:
string
;
}
>
RAG
Index
Constructors
constructor
Properties
demos?
examples?
gen
Answer
gen
Query
max
Hops
query
Fn
trace?
Methods
forward
get
Signature
get
Traces
load
Demos
register
set
Demos
set
Examples
set
Trace
update
Key
Constructors
constructor
new RAG
(
ai
,
queryFn
,
options
)
:
RAG
Parameters
ai
:
AIService
queryFn
:
(
(
query
)
=>
Promise
<
string
>
)
(
query
)
:
Promise
<
string
>
Parameters
query
:
string
Returns
Promise
<
string
>
options
:
Readonly
<
GenerateOptions
&
{
maxHops
?:
number
;
}
>
Returns
RAG
Properties
Protected
Optional
demos
demos
?:
Record
<
string
,
Value
>
[]
Protected
Optional
examples
examples
?:
Record
<
string
,
Value
>
[]
Private
gen
Answer
gen
Answer
:
Generate
<
{
context
:
string
[]
;
question
:
string
;
}
,
{
answer
:
string
;
}
>
Type declaration
context
:
string
[]
question
:
string
Type declaration
answer
:
string
Private
gen
Query
gen
Query
:
Generate
<
{
context
:
string
[]
;
question
:
string
;
}
,
{
query
:
string
;
}
>
Type declaration
context
:
string
[]
question
:
string
Type declaration
query
:
string
Private
max
Hops
max
Hops
:
number
Private
query
Fn
query
Fn
:
(
(
query
)
=>
Promise
<
string
>
)
Type declaration
(
query
)
:
Promise
<
string
>
Parameters
query
:
string
Returns
Promise
<
string
>
Protected
Optional
trace
trace
?:
Record
<
string
,
Value
>
Methods
forward
forward
(
__namedParameters
,
options
?
)
:
Promise
<
{
answer
:
string
;
}
>
Parameters
__namedParameters
:
Readonly
<
{
question
:
string
;
}
>
Optional
options
:
Readonly
<
ProgramForwardOptions
>
Returns
Promise
<
{
answer
:
string
;
}
>
get
Signature
get
Signature
(
)
:
Signature
Returns
Signature
get
Traces
get
Traces
(
)
:
ProgramTrace
[]
Returns
ProgramTrace
[]
load
Demos
load
Demos
(
filename
)
:
void
Parameters
filename
:
string
Returns
void
register
register
(
prog
)
:
void
Parameters
prog
:
Readonly
<
Tunable
>
Returns
void
set
Demos
set
Demos
(
demos
)
:
void
Parameters
demos
:
readonly
ProgramDemos
[]
Returns
void
set
Examples
set
Examples
(
examples
)
:
void
Parameters
examples
:
readonly
Record
<
string
,
Value
>
[]
Returns
void
set
Trace
set
Trace
(
trace
)
:
void
Parameters
trace
:
Record
<
string
,
Value
>
Returns
void
update
Key
update
Key
(
parentKey
)
:
void
Parameters
parentKey
:
string
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
demos
examples
gen
Answer
gen
Query
max
Hops
query
Fn
trace
forward
get
Signature
get
Traces
load
Demos
register
set
Demos
set
Examples
set
Trace
update
Key
llmclient
Loading...