GitHub
Docs
Preparing search index...
The search index is not available
Langfuse JS/TS SDKs
Langfuse JS/TS SDKs
langfuse-core
LangfuseObjectClient
Class LangfuseObjectClient
Abstract
Hierarchy (
view full
)
LangfuseObjectClient
LangfuseTraceClient
Index
Constructors
constructor
Properties
client
id
observation
Id
trace
Id
Methods
event
generation
get
Trace
Url
score
span
Constructors
constructor
new
Langfuse
Object
Client
(
__namedParameters
)
:
LangfuseObjectClient
Parameters
__namedParameters
:
{
client
:
LangfuseCore
;
id
:
string
;
observationId
:
null
|
string
;
traceId
:
string
;
}
client
:
LangfuseCore
id
:
string
observation
Id
:
null
|
string
trace
Id
:
string
Returns
LangfuseObjectClient
Properties
Readonly
client
client
:
LangfuseCore
Readonly
id
id
:
string
Readonly
observation
Id
observation
Id
:
null
|
string
Readonly
trace
Id
trace
Id
:
string
Methods
event
event
(
body
)
:
LangfuseEventClient
Parameters
body
:
Omit
<
Omit
<
{
id
?:
null
|
string
;
input
?:
any
;
level
?:
|
"DEBUG"
|
"DEFAULT"
|
"WARNING"
|
"ERROR"
;
metadata
?:
any
;
name
?:
null
|
string
;
output
?:
any
;
parentObservationId
?:
null
|
string
;
startTime
?:
null
|
Date
;
statusMessage
?:
null
|
string
;
traceId
?:
null
|
string
;
version
?:
null
|
string
;
}
,
"externalId"
|
"traceIdType"
>
,
"traceId"
|
"parentObservationId"
>
Returns
LangfuseEventClient
generation
generation
(
body
)
:
LangfuseGenerationClient
Parameters
body
:
Omit
<
Omit
<
{
completionStartTime
?:
null
|
Date
;
costDetails
?:
null
|
{
[
key
:
string
]
:
number
;
}
;
endTime
?:
null
|
Date
;
id
?:
null
|
string
;
input
?:
any
;
level
?:
|
"DEBUG"
|
"DEFAULT"
|
"WARNING"
|
"ERROR"
;
metadata
?:
any
;
model
?:
null
|
string
;
modelParameters
?:
null
|
{
[
key
:
string
]
:
components
[
"schemas"
]
[
"MapValue"
]
;
}
;
name
?:
null
|
string
;
output
?:
any
;
parentObservationId
?:
null
|
string
;
promptName
?:
null
|
string
;
promptVersion
?:
null
|
number
;
startTime
?:
null
|
Date
;
statusMessage
?:
null
|
string
;
traceId
?:
null
|
string
;
usage
?:
{
input
?:
null
|
number
;
inputCost
?:
null
|
number
;
output
?:
null
|
number
;
outputCost
?:
null
|
number
;
total
?:
null
|
number
;
totalCost
?:
null
|
number
;
unit
?:
|
"CHARACTERS"
|
"TOKENS"
|
"MILLISECONDS"
|
"SECONDS"
|
"IMAGES"
|
"REQUESTS"
;
}
|
{
completionTokens
?:
null
|
number
;
promptTokens
?:
null
|
number
;
totalTokens
?:
null
|
number
;
}
;
usageDetails
?:
{
[
key
:
string
]
:
number
;
}
|
{
completion_tokens
:
number
;
completion_tokens_details
?:
null
|
{
[
key
:
string
]
:
number
;
}
;
prompt_tokens
:
number
;
prompt_tokens_details
?:
null
|
{
[
key
:
string
]
:
number
;
}
;
total_tokens
:
number
;
}
;
version
?:
null
|
string
;
}
,
"externalId"
|
"traceIdType"
>
,
|
"traceId"
|
"parentObservationId"
|
"promptName"
|
"promptVersion"
>
&
PromptInput
Returns
LangfuseGenerationClient
get
Trace
Url
get
Trace
Url
(
)
:
string
Returns
string
score
score
(
body
)
:
this
Parameters
body
:
Omit
<
Omit
<
{
comment
?:
null
|
string
;
configId
?:
null
|
string
;
dataType
?:
"NUMERIC"
|
"BOOLEAN"
|
"CATEGORICAL"
;
id
?:
null
|
string
;
name
:
string
;
observationId
?:
null
|
string
;
traceId
:
string
;
value
:
string
|
number
;
}
,
"externalId"
|
"traceIdType"
>
,
"traceId"
|
"parentObservationId"
>
Returns
this
span
span
(
body
)
:
LangfuseSpanClient
Parameters
body
:
Omit
<
Omit
<
{
endTime
?:
null
|
Date
;
id
?:
null
|
string
;
input
?:
any
;
level
?:
|
"DEBUG"
|
"DEFAULT"
|
"WARNING"
|
"ERROR"
;
metadata
?:
any
;
name
?:
null
|
string
;
output
?:
any
;
parentObservationId
?:
null
|
string
;
startTime
?:
null
|
Date
;
statusMessage
?:
null
|
string
;
traceId
?:
null
|
string
;
version
?:
null
|
string
;
}
,
"externalId"
|
"traceIdType"
>
,
"traceId"
|
"parentObservationId"
>
Returns
LangfuseSpanClient
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
client
id
observation
Id
trace
Id
Methods
event
generation
get
Trace
Url
score
span
GitHub
Docs
Langfuse JS/TS SDKs
Loading...