Skip to main content

weave.trace_server.trace_server_interface


API Overview

Classes


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: typing.Dict[str, typing.Any]
  • inputs: typing.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: typing.List[str]
  • wb_user_id: typing.Optional[str]

class CallsDeleteRes


class CallsFilter

Pydantic Fields:

  • op_names: typing.Optional[typing.List[str]]
  • input_refs: typing.Optional[typing.List[str]]
  • output_refs: typing.Optional[typing.List[str]]
  • parent_ids: typing.Optional[typing.List[str]]
  • trace_ids: typing.Optional[typing.List[str]]
  • call_ids: typing.Optional[typing.List[str]]
  • trace_roots_only: typing.Optional[bool]
  • wb_user_ids: typing.Optional[typing.List[str]]
  • wb_run_ids: typing.Optional[typing.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[typing.List[SortBy]]
  • query: typing.Optional[weave.trace_server.interface.query.Query]
  • include_costs: typing.Optional[bool]
  • include_feedback: typing.Optional[bool]
  • columns: typing.Optional[typing.List[str]]
  • expand_columns: typing.Optional[typing.List[str]]

class CallsQueryRes

Pydantic Fields:

  • calls: typing.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 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: typing.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[typing.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: typing.Dict[str, typing.Any]
  • 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: typing.Dict[str, typing.Any]
  • wb_user_id: typing.Optional[str]

class FeedbackCreateRes

Pydantic Fields:

  • id: <class 'str'>
  • created_at: <class 'datetime.datetime'>
  • wb_user_id: <class 'str'>
  • payload: typing.Dict[str, typing.Any]

class FeedbackDict


class FeedbackPayloadNoteReq

Pydantic Fields:

  • note: <class 'str'>

class FeedbackPayloadReactionReq

Pydantic Fields:

  • emoji: <class 'str'>

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[typing.List[SortBy]]
  • limit: typing.Optional[int]
  • offset: typing.Optional[int]

class FeedbackQueryRes

Pydantic Fields:

  • result: list[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[typing.List[SortBy]]
  • metadata_only: typing.Optional[bool]

class ObjQueryRes

Pydantic Fields:

  • objs: typing.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

class ObjectVersionFilter

Pydantic Fields:

  • base_object_classes: typing.Optional[typing.List[str]]
  • object_ids: typing.Optional[typing.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: typing.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[typing.List[str]]
  • latest_only: typing.Optional[bool]

class RefsReadBatchReq

Pydantic Fields:

  • refs: typing.List[str]

class RefsReadBatchRes

Pydantic Fields:

  • vals: typing.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: typing.Dict[str, typing.Any]
  • inputs: typing.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[typing.List[SortBy]]

class TableQueryRes

Pydantic Fields:

  • rows: typing.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[typing.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 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 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 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_update

table_update(req: TableUpdateReq) → TableUpdateRes

class TraceStatus

An enumeration.


class WeaveSummarySchema