weave.trace_server.trace_server_interface
API Overview
Classes
trace_server_interface.ActionsExecuteBatchReq
trace_server_interface.ActionsExecuteBatchRes
trace_server_interface.CallEndReq
trace_server_interface.CallEndRes
trace_server_interface.CallReadReq
trace_server_interface.CallReadRes
trace_server_interface.CallSchema
trace_server_interface.CallStartReq
trace_server_interface.CallStartRes
trace_server_interface.CallUpdateReq
trace_server_interface.CallUpdateRes
trace_server_interface.CallsDeleteReq
trace_server_interface.CallsDeleteRes
trace_server_interface.CallsFilter
trace_server_interface.CallsQueryReq
trace_server_interface.CallsQueryRes
trace_server_interface.CallsQueryStatsReq
trace_server_interface.CallsQueryStatsRes
trace_server_interface.CompletionsCreateReq
trace_server_interface.CompletionsCreateRequestInputs
trace_server_interface.CompletionsCreateRes
trace_server_interface.CostCreateInput
trace_server_interface.CostCreateReq
trace_server_interface.CostCreateRes
trace_server_interface.CostPurgeReq
trace_server_interface.CostPurgeRes
trace_server_interface.CostQueryOutput
trace_server_interface.CostQueryReq
trace_server_interface.CostQueryRes
trace_server_interface.EndedCallSchemaForInsert
trace_server_interface.EnsureProjectExistsRes
trace_server_interface.ExtraKeysTypedDict
trace_server_interface.Feedback
trace_server_interface.FeedbackCreateReq
trace_server_interface.FeedbackCreateRes
trace_server_interface.FeedbackDict
trace_server_interface.FeedbackPurgeReq
trace_server_interface.FeedbackPurgeRes
trace_server_interface.FeedbackQueryReq
trace_server_interface.FeedbackQueryRes
trace_server_interface.FeedbackReplaceReq
trace_server_interface.FeedbackReplaceRes
trace_server_interface.FileContentReadReq
trace_server_interface.FileContentReadRes
trace_server_interface.FileCreateReq
trace_server_interface.FileCreateRes
trace_server_interface.LLMCostSchema
trace_server_interface.LLMUsageSchema
trace_server_interface.ObjCreateReq
trace_server_interface.ObjCreateRes
trace_server_interface.ObjQueryReq
trace_server_interface.ObjQueryRes
trace_server_interface.ObjReadReq
trace_server_interface.ObjReadRes
trace_server_interface.ObjSchema
trace_server_interface.ObjSchemaForInsert
trace_server_interface.ObjectVersionFilter
trace_server_interface.OpCreateReq
trace_server_interface.OpCreateRes
trace_server_interface.OpQueryReq
trace_server_interface.OpQueryRes
trace_server_interface.OpReadReq
trace_server_interface.OpReadRes
trace_server_interface.OpVersionFilter
trace_server_interface.RefsReadBatchReq
trace_server_interface.RefsReadBatchRes
trace_server_interface.SortBy
trace_server_interface.StartedCallSchemaForInsert
trace_server_interface.SummaryInsertMap
trace_server_interface.SummaryMap
trace_server_interface.TableAppendSpec
trace_server_interface.TableAppendSpecPayload
trace_server_interface.TableCreateReq
trace_server_interface.TableCreateRes
trace_server_interface.TableInsertSpec
trace_server_interface.TableInsertSpecPayload
trace_server_interface.TablePopSpec
trace_server_interface.TablePopSpecPayload
trace_server_interface.TableQueryReq
trace_server_interface.TableQueryRes
trace_server_interface.TableQueryStatsReq
trace_server_interface.TableQueryStatsRes
trace_server_interface.TableRowFilter
trace_server_interface.TableRowSchema
trace_server_interface.TableSchemaForInsert
trace_server_interface.TableUpdateReq
trace_server_interface.TableUpdateRes
trace_server_interface.TraceServerInterface
trace_server_interface.TraceStatus
: An enumeration.trace_server_interface.WeaveSummarySchema
class ActionsExecuteBatchReq
Pydantic Fields:
project_id
:<class 'str'>
action_ref
:<class 'str'>
call_ids
:list[str]
wb_user_id
:typing.Optional[str]
class ActionsExecuteBatchRes
class CallEndReq
Pydantic Fields:
end
:<class 'EndedCallSchemaForInsert'>
class CallEndRes
class CallReadReq
Pydantic Fields:
project_id
:<class 'str'>
id
:<class 'str'>
include_costs
:typing.Optional[bool]
class CallReadRes
Pydantic Fields:
call
:typing.Optional[CallSchema]
class CallSchema
Pydantic Fields:
id
:<class 'str'>
project_id
:<class 'str'>
op_name
:<class 'str'>
display_name
:typing.Optional[str]
trace_id
:<class 'str'>
parent_id
:typing.Optional[str]
started_at
:<class 'datetime.datetime'>
attributes
:dict[str, typing.Any]
inputs
:dict[str, typing.Any]
ended_at
:typing.Optional[datetime.datetime]
exception
:typing.Optional[str]
output
:typing.Optional[typing.Any]
summary
:typing.Optional[SummaryMap]
wb_user_id
:typing.Optional[str]
wb_run_id
:typing.Optional[str]
deleted_at
:typing.Optional[datetime.datetime]
method serialize_typed_dicts
serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
class CallStartReq
Pydantic Fields:
start
:<class 'StartedCallSchemaForInsert'>
class CallStartRes
Pydantic Fields:
id
:<class 'str'>
trace_id
:<class 'str'>
class CallUpdateReq
Pydantic Fields:
project_id
:<class 'str'>
call_id
:<class 'str'>
display_name
:typing.Optional[str]
wb_user_id
:typing.Optional[str]
class CallUpdateRes
class CallsDeleteReq
Pydantic Fields:
project_id
:<class 'str'>
call_ids
:list[str]
wb_user_id
:typing.Optional[str]
class CallsDeleteRes
class CallsFilter
Pydantic Fields:
op_names
:typing.Optional[list[str]]
input_refs
:typing.Optional[list[str]]
output_refs
:typing.Optional[list[str]]
parent_ids
:typing.Optional[list[str]]
trace_ids
:typing.Optional[list[str]]
call_ids
:typing.Optional[list[str]]
trace_roots_only
:typing.Optional[bool]
wb_user_ids
:typing.Optional[list[str]]
wb_run_ids
:typing.Optional[list[str]]
class CallsQueryReq
Pydantic Fields:
project_id
:<class 'str'>
filter
:typing.Optional[CallsFilter]
limit
:typing.Optional[int]
offset
:typing.Optional[int]
sort_by
:typing.Optional[list[SortBy]]
query
:typing.Optional[weave.trace_server.interface.query.Query]
include_costs
:typing.Optional[bool]
include_feedback
:typing.Optional[bool]
columns
:typing.Optional[list[str]]
expand_columns
:typing.Optional[list[str]]
class CallsQueryRes
Pydantic Fields:
calls
:list[CallSchema]
class CallsQueryStatsReq
Pydantic Fields:
project_id
:<class 'str'>
filter
:typing.Optional[CallsFilter]
query
:typing.Optional[weave.trace_server.interface.query.Query]
class CallsQueryStatsRes
Pydantic Fields:
count
:<class 'int'>
class CompletionsCreateReq
Pydantic Fields:
project_id
:<class 'str'>
inputs
:<class 'CompletionsCreateRequestInputs'>
wb_user_id
:typing.Optional[str]
track_llm_call
:typing.Optional[bool]
class CompletionsCreateRequestInputs
Pydantic Fields:
model
:<class 'str'>
messages
:<class 'list'>
timeout
:typing.Union[float, str, NoneType]
temperature
:typing.Optional[float]
top_p
:typing.Optional[float]
n
:typing.Optional[int]
stop
:typing.Union[str, list, NoneType]
max_completion_tokens
:typing.Optional[int]
max_tokens
:typing.Optional[int]
modalities
:typing.Optional[list]
presence_penalty
:typing.Optional[float]
frequency_penalty
:typing.Optional[float]
logit_bias
:typing.Optional[dict]
user
:typing.Optional[str]
response_format
:typing.Union[dict, type[pydantic.main.BaseModel], NoneType]
seed
:typing.Optional[int]
tools
:typing.Optional[list]
tool_choice
:typing.Union[str, dict, NoneType]
logprobs
:typing.Optional[bool]
top_logprobs
:typing.Optional[int]
parallel_tool_calls
:typing.Optional[bool]
extra_headers
:typing.Optional[dict]
functions
:typing.Optional[list]
function_call
:typing.Optional[str]
api_version
:typing.Optional[str]
class CompletionsCreateRes
Pydantic Fields:
response
:dict[str, typing.Any]
weave_call_id
:typing.Optional[str]
class CostCreateInput
Pydantic Fields:
prompt_token_cost
:<class 'float'>
completion_token_cost
:<class 'float'>
prompt_token_cost_unit
:typing.Optional[str]
completion_token_cost_unit
:typing.Optional[str]
effective_date
:typing.Optional[datetime.datetime]
provider_id
:typing.Optional[str]
class CostCreateReq
Pydantic Fields:
project_id
:<class 'str'>
costs
:dict[str, CostCreateInput]
wb_user_id
:typing.Optional[str]
class CostCreateRes
Pydantic Fields:
ids
:list[tuple[str, str]]
class CostPurgeReq
Pydantic Fields:
project_id
:<class 'str'>
query
:<class 'weave.trace_server.interface.query.Query'>
class CostPurgeRes
class CostQueryOutput
Pydantic Fields:
id
:typing.Optional[str]
llm_id
:typing.Optional[str]
prompt_token_cost
:typing.Optional[float]
completion_token_cost
:typing.Optional[float]
prompt_token_cost_unit
:typing.Optional[str]
completion_token_cost_unit
:typing.Optional[str]
effective_date
:typing.Optional[datetime.datetime]
provider_id
:typing.Optional[str]
class CostQueryReq
Pydantic Fields:
project_id
:<class 'str'>
fields
:typing.Optional[list[str]]
query
:typing.Optional[weave.trace_server.interface.query.Query]
sort_by
:typing.Optional[list[SortBy]]
limit
:typing.Optional[int]
offset
:typing.Optional[int]
class CostQueryRes
Pydantic Fields:
results
:list[CostQueryOutput]
class EndedCallSchemaForInsert
Pydantic Fields:
project_id
:<class 'str'>
id
:<class 'str'>
ended_at
:<class 'datetime.datetime'>
exception
:typing.Optional[str]
output
:typing.Optional[typing.Any]
summary
:<class 'SummaryInsertMap'>
method serialize_typed_dicts
serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
class EnsureProjectExistsRes
Pydantic Fields:
project_name
:<class 'str'>
class ExtraKeysTypedDict
class Feedback
Pydantic Fields:
project_id
:<class 'str'>
weave_ref
:<class 'str'>
creator
:typing.Optional[str]
feedback_type
:<class 'str'>
payload
:dict[str, typing.Any]
annotation_ref
:typing.Optional[str]
runnable_ref
:typing.Optional[str]
call_ref
:typing.Optional[str]
trigger_ref
:typing.Optional[str]
wb_user_id
:typing.Optional[str]
id
:<class 'str'>
created_at
:<class 'datetime.datetime'>
class FeedbackCreateReq
Pydantic Fields:
project_id
:<class 'str'>
weave_ref
:<class 'str'>
creator
:typing.Optional[str]
feedback_type
:<class 'str'>
payload
:dict[str, typing.Any]
annotation_ref
:typing.Optional[str]
runnable_ref
:typing.Optional[str]
call_ref
:typing.Optional[str]
trigger_ref
:typing.Optional[str]
wb_user_id
:typing.Optional[str]
class FeedbackCreateRes
Pydantic Fields:
id
:<class 'str'>
created_at
:<class 'datetime.datetime'>
wb_user_id
:<class 'str'>
payload
:dict[str, typing.Any]
class FeedbackDict
class FeedbackPurgeReq
Pydantic Fields:
project_id
:<class 'str'>
query
:<class 'weave.trace_server.interface.query.Query'>
class FeedbackPurgeRes
class FeedbackQueryReq
Pydantic Fields:
project_id
:<class 'str'>
fields
:typing.Optional[list[str]]
query
:typing.Optional[weave.trace_server.interface.query.Query]
sort_by
:typing.Optional[list[SortBy]]
limit
:typing.Optional[int]
offset
:typing.Optional[int]
class FeedbackQueryRes
Pydantic Fields:
result
:list[dict[str, typing.Any]]
class FeedbackReplaceReq
Pydantic Fields:
project_id
:<class 'str'>
weave_ref
:<class 'str'>
creator
:typing.Optional[str]
feedback_type
:<class 'str'>
payload
:dict[str, typing.Any]
annotation_ref
:typing.Optional[str]
runnable_ref
:typing.Optional[str]
call_ref
:typing.Optional[str]
trigger_ref
:typing.Optional[str]
wb_user_id
:typing.Optional[str]
feedback_id
:<class 'str'>
class FeedbackReplaceRes
Pydantic Fields:
id
:<class 'str'>
created_at
:<class 'datetime.datetime'>
wb_user_id
:<class 'str'>
payload
:dict[str, typing.Any]
class FileContentReadReq
Pydantic Fields:
project_id
:<class 'str'>
digest
:<class 'str'>
class FileContentReadRes
Pydantic Fields:
content
:<class 'bytes'>
class FileCreateReq
Pydantic Fields:
project_id
:<class 'str'>
name
:<class 'str'>
content
:<class 'bytes'>
class FileCreateRes
Pydantic Fields:
digest
:<class 'str'>
class LLMCostSchema
class LLMUsageSchema
class ObjCreateReq
Pydantic Fields:
obj
:<class 'ObjSchemaForInsert'>
class ObjCreateRes
Pydantic Fields:
digest
:<class 'str'>
class ObjQueryReq
Pydantic Fields:
project_id
:<class 'str'>
filter
:typing.Optional[ObjectVersionFilter]
limit
:typing.Optional[int]
offset
:typing.Optional[int]
sort_by
:typing.Optional[list[SortBy]]
metadata_only
:typing.Optional[bool]
class ObjQueryRes
Pydantic Fields:
objs
:list[ObjSchema]
class ObjReadReq
Pydantic Fields:
project_id
:<class 'str'>
object_id
:<class 'str'>
digest
:<class 'str'>
class ObjReadRes
Pydantic Fields:
obj
:<class 'ObjSchema'>
class ObjSchema
Pydantic Fields:
project_id
:<class 'str'>
object_id
:<class 'str'>
created_at
:<class 'datetime.datetime'>
deleted_at
:typing.Optional[datetime.datetime]
digest
:<class 'str'>
version_index
:<class 'int'>
is_latest
:<class 'int'>
kind
:<class 'str'>
base_object_class
:typing.Optional[str]
val
:typing.Any
class ObjSchemaForInsert
Pydantic Fields:
project_id
:<class 'str'>
object_id
:<class 'str'>
val
:typing.Any
builtin_object_class
:typing.Optional[str]
set_base_object_class
:typing.Optional[str]
method model_post_init
model_post_init(_ObjSchemaForInsert__context: Any) → None
class ObjectVersionFilter
Pydantic Fields:
base_object_classes
:typing.Optional[list[str]]
object_ids
:typing.Optional[list[str]]
is_op
:typing.Optional[bool]
latest_only
:typing.Optional[bool]
class OpCreateReq
Pydantic Fields:
op_obj
:<class 'ObjSchemaForInsert'>
class OpCreateRes
Pydantic Fields:
digest
:<class 'str'>
class OpQueryReq
Pydantic Fields:
project_id
:<class 'str'>
filter
:typing.Optional[OpVersionFilter]
class OpQueryRes
Pydantic Fields:
op_objs
:list[ObjSchema]
class OpReadReq
Pydantic Fields:
project_id
:<class 'str'>
name
:<class 'str'>
digest
:<class 'str'>
class OpReadRes
Pydantic Fields:
op_obj
:<class 'ObjSchema'>
class OpVersionFilter
Pydantic Fields:
op_names
:typing.Optional[list[str]]
latest_only
:typing.Optional[bool]
class RefsReadBatchReq
Pydantic Fields:
refs
:list[str]
class RefsReadBatchRes
Pydantic Fields:
vals
:list[typing.Any]
class SortBy
Pydantic Fields:
field
:<class 'str'>
direction
:typing.Literal['asc', 'desc']
class StartedCallSchemaForInsert
Pydantic Fields:
project_id
:<class 'str'>
id
:typing.Optional[str]
op_name
:<class 'str'>
display_name
:typing.Optional[str]
trace_id
:typing.Optional[str]
parent_id
:typing.Optional[str]
started_at
:<class 'datetime.datetime'>
attributes
:dict[str, typing.Any]
inputs
:dict[str, typing.Any]
wb_user_id
:typing.Optional[str]
wb_run_id
:typing.Optional[str]
class SummaryInsertMap
class SummaryMap
class TableAppendSpec
Pydantic Fields:
append
:<class 'TableAppendSpecPayload'>
class TableAppendSpecPayload
Pydantic Fields:
row
:dict[str, typing.Any]
class TableCreateReq
Pydantic Fields:
table
:<class 'TableSchemaForInsert'>
class TableCreateRes
Pydantic Fields:
digest
:<class 'str'>
row_digests
:list[str]
class TableInsertSpec
Pydantic Fields:
insert
:<class 'TableInsertSpecPayload'>
class TableInsertSpecPayload
Pydantic Fields:
index
:<class 'int'>
row
:dict[str, typing.Any]
class TablePopSpec
Pydantic Fields:
pop
:<class 'TablePopSpecPayload'>
class TablePopSpecPayload
Pydantic Fields:
index
:<class 'int'>
class TableQueryReq
Pydantic Fields:
project_id
:<class 'str'>
digest
:<class 'str'>
filter
:typing.Optional[TableRowFilter]
limit
:typing.Optional[int]
offset
:typing.Optional[int]
sort_by
:typing.Optional[list[SortBy]]
class TableQueryRes
Pydantic Fields:
rows
:list[TableRowSchema]
class TableQueryStatsReq
Pydantic Fields:
project_id
:<class 'str'>
digest
:<class 'str'>
class TableQueryStatsRes
Pydantic Fields:
count
:<class 'int'>
class TableRowFilter
Pydantic Fields:
row_digests
:typing.Optional[list[str]]
class TableRowSchema
Pydantic Fields:
digest
:<class 'str'>
val
:typing.Any
class TableSchemaForInsert
Pydantic Fields:
project_id
:<class 'str'>
rows
:list[dict[str, typing.Any]]
class TableUpdateReq
Pydantic Fields:
project_id
:<class 'str'>
base_digest
:<class 'str'>
updates
:list[typing.Union[TableAppendSpec, TablePopSpec, TableInsertSpec]]
class TableUpdateRes
Pydantic Fields:
digest
:<class 'str'>
updated_row_digests
:list[str]
class TraceServerInterface
method actions_execute_batch
actions_execute_batch(req: ActionsExecuteBatchReq) → ActionsExecuteBatchRes
method call_end
call_end(req: CallEndReq) → CallEndRes
method call_read
call_read(req: CallReadReq) → CallReadRes
method call_start
call_start(req: CallStartReq) → CallStartRes
method call_update
call_update(req: CallUpdateReq) → CallUpdateRes
method calls_delete
calls_delete(req: CallsDeleteReq) → CallsDeleteRes
method calls_query
calls_query(req: CallsQueryReq) → CallsQueryRes
method calls_query_stats
calls_query_stats(req: CallsQueryStatsReq) → CallsQueryStatsRes
method calls_query_stream
calls_query_stream(req: CallsQueryReq) → Iterator[CallSchema]
method completions_create
completions_create(req: CompletionsCreateReq) → CompletionsCreateRes
method cost_create
cost_create(req: CostCreateReq) → CostCreateRes
method cost_purge
cost_purge(req: CostPurgeReq) → CostPurgeRes
method cost_query
cost_query(req: CostQueryReq) → CostQueryRes
method ensure_project_exists
ensure_project_exists(entity: str, project: str) → EnsureProjectExistsRes
method feedback_create
feedback_create(req: FeedbackCreateReq) → FeedbackCreateRes
method feedback_purge
feedback_purge(req: FeedbackPurgeReq) → FeedbackPurgeRes
method feedback_query
feedback_query(req: FeedbackQueryReq) → FeedbackQueryRes
method feedback_replace
feedback_replace(req: FeedbackReplaceReq) → FeedbackReplaceRes
method file_content_read
file_content_read(req: FileContentReadReq) → FileContentReadRes
method file_create
file_create(req: FileCreateReq) → FileCreateRes
method obj_create
obj_create(req: ObjCreateReq) → ObjCreateRes
method obj_read
obj_read(req: ObjReadReq) → ObjReadRes
method objs_query
objs_query(req: ObjQueryReq) → ObjQueryRes
method op_create
op_create(req: OpCreateReq) → OpCreateRes
method op_read
op_read(req: OpReadReq) → OpReadRes
method ops_query
ops_query(req: OpQueryReq) → OpQueryRes
method refs_read_batch
refs_read_batch(req: RefsReadBatchReq) → RefsReadBatchRes
method table_create
table_create(req: TableCreateReq) → TableCreateRes
method table_query
table_query(req: TableQueryReq) → TableQueryRes
method table_query_stats
table_query_stats(req: TableQueryStatsReq) → TableQueryStatsRes
method table_query_stream
table_query_stream(req: TableQueryReq) → Iterator[TableRowSchema]
method table_update
table_update(req: TableUpdateReq) → TableUpdateRes
class TraceStatus
An enumeration.