@arizeai/openinference-semantic-conventions
Advanced tools
Comparing version
@@ -238,2 +238,6 @@ /** | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
export declare const TOOL_PARAMETERS: "tool.parameters"; | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -246,3 +250,36 @@ */ | ||
export declare const USER_ID: "user.id"; | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
export declare const RERANKER_INPUT_DOCUMENTS: "reranker.input_documents"; | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
export declare const RERANKER_OUTPUT_DOCUMENTS: "reranker.output_documents"; | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
export declare const RERANKER_QUERY: "reranker.query"; | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
export declare const RERANKER_MODEL_NAME: "reranker.model_name"; | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
export declare const RERANKER_TOP_K: "reranker.top_k"; | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
export declare const METADATA: "metadata"; | ||
/** | ||
* A prompt template version | ||
*/ | ||
export declare const PROMPT_TEMPLATE_VERSION: "llm.prompt_template.version"; | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
export declare const TAG_TAGS: "tag.tags"; | ||
export declare const SemanticConventions: { | ||
readonly IMAGE_URL: "image.url"; | ||
readonly INPUT_VALUE: "input.value"; | ||
@@ -268,2 +305,6 @@ readonly INPUT_MIME_TYPE: "input.mime_type"; | ||
readonly MESSAGE_CONTENT: "message.content"; | ||
readonly MESSAGE_CONTENTS: "message.contents"; | ||
readonly MESSAGE_CONTENT_IMAGE: "message_content.image"; | ||
readonly MESSAGE_CONTENT_TEXT: "message_content.text"; | ||
readonly MESSAGE_CONTENT_TYPE: "message_content.type"; | ||
readonly DOCUMENT_ID: "document.id"; | ||
@@ -279,4 +320,11 @@ readonly DOCUMENT_CONTENT: "document.content"; | ||
readonly TOOL_NAME: "tool.name"; | ||
readonly TOOL_PARAMETERS: "tool.parameters"; | ||
readonly PROMPT_TEMPLATE_VARIABLES: "llm.prompt_template.variables"; | ||
readonly PROMPT_TEMPLATE_TEMPLATE: "llm.prompt_template.template"; | ||
readonly PROMPT_TEMPLATE_VERSION: "llm.prompt_template.version"; | ||
readonly RERANKER_INPUT_DOCUMENTS: "reranker.input_documents"; | ||
readonly RERANKER_OUTPUT_DOCUMENTS: "reranker.output_documents"; | ||
readonly RERANKER_QUERY: "reranker.query"; | ||
readonly RERANKER_MODEL_NAME: "reranker.model_name"; | ||
readonly RERANKER_TOP_K: "reranker.top_k"; | ||
readonly LLM_FUNCTION_CALL: "llm.function_call"; | ||
@@ -286,13 +334,16 @@ readonly RETRIEVAL_DOCUMENTS: "retrieval.documents"; | ||
readonly USER_ID: "user.id"; | ||
readonly METADATA: "metadata"; | ||
readonly TAG_TAGS: "tag.tags"; | ||
readonly OPENINFERENCE_SPAN_KIND: "openinference.span.kind"; | ||
}; | ||
export declare enum OpenInferenceSpanKind { | ||
LLM = "llm", | ||
CHAIN = "chain", | ||
TOOL = "tool", | ||
RETRIEVER = "retriever", | ||
RERANKER = "reranker", | ||
EMBEDDING = "embedding", | ||
AGENT = "agent", | ||
GUARDRAIL = "guardrail" | ||
LLM = "LLM", | ||
CHAIN = "CHAIN", | ||
TOOL = "TOOL", | ||
RETRIEVER = "RETRIEVER", | ||
RERANKER = "RERANKER", | ||
EMBEDDING = "EMBEDDING", | ||
AGENT = "AGENT", | ||
GUARDRAIL = "GUARDRAIL", | ||
EVALUATOR = "EVALUATOR" | ||
} | ||
@@ -299,0 +350,0 @@ export declare enum MimeType { |
@@ -239,2 +239,6 @@ /** | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
export var TOOL_PARAMETERS = "".concat(SemanticAttributePrefixes.tool, ".").concat(ToolAttributePostfixes.parameters); | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -247,3 +251,36 @@ */ | ||
export var USER_ID = "".concat(SemanticAttributePrefixes.user, ".").concat(UserAttributePostfixes.id); | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
export var RERANKER_INPUT_DOCUMENTS = "".concat(SemanticAttributePrefixes.reranker, ".").concat(RerankerAttributePostfixes.input_documents); | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
export var RERANKER_OUTPUT_DOCUMENTS = "".concat(SemanticAttributePrefixes.reranker, ".").concat(RerankerAttributePostfixes.output_documents); | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
export var RERANKER_QUERY = "".concat(SemanticAttributePrefixes.reranker, ".").concat(RerankerAttributePostfixes.query); | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
export var RERANKER_MODEL_NAME = "".concat(SemanticAttributePrefixes.reranker, ".").concat(RerankerAttributePostfixes.model_name); | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
export var RERANKER_TOP_K = "".concat(SemanticAttributePrefixes.reranker, ".").concat(RerankerAttributePostfixes.top_k); | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
export var METADATA = "metadata"; | ||
/** | ||
* A prompt template version | ||
*/ | ||
export var PROMPT_TEMPLATE_VERSION = "".concat(PROMPT_TEMPLATE_PREFIX, ".version"); | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
export var TAG_TAGS = "".concat(SemanticAttributePrefixes.tag, ".").concat(TagAttributePostfixes.tags); | ||
export var SemanticConventions = { | ||
IMAGE_URL: IMAGE_URL, | ||
INPUT_VALUE: INPUT_VALUE, | ||
@@ -269,2 +306,6 @@ INPUT_MIME_TYPE: INPUT_MIME_TYPE, | ||
MESSAGE_CONTENT: MESSAGE_CONTENT, | ||
MESSAGE_CONTENTS: MESSAGE_CONTENTS, | ||
MESSAGE_CONTENT_IMAGE: MESSAGE_CONTENT_IMAGE, | ||
MESSAGE_CONTENT_TEXT: MESSAGE_CONTENT_TEXT, | ||
MESSAGE_CONTENT_TYPE: MESSAGE_CONTENT_TYPE, | ||
DOCUMENT_ID: DOCUMENT_ID, | ||
@@ -280,4 +321,11 @@ DOCUMENT_CONTENT: DOCUMENT_CONTENT, | ||
TOOL_NAME: TOOL_NAME, | ||
TOOL_PARAMETERS: TOOL_PARAMETERS, | ||
PROMPT_TEMPLATE_VARIABLES: PROMPT_TEMPLATE_VARIABLES, | ||
PROMPT_TEMPLATE_TEMPLATE: PROMPT_TEMPLATE_TEMPLATE, | ||
PROMPT_TEMPLATE_VERSION: PROMPT_TEMPLATE_VERSION, | ||
RERANKER_INPUT_DOCUMENTS: RERANKER_INPUT_DOCUMENTS, | ||
RERANKER_OUTPUT_DOCUMENTS: RERANKER_OUTPUT_DOCUMENTS, | ||
RERANKER_QUERY: RERANKER_QUERY, | ||
RERANKER_MODEL_NAME: RERANKER_MODEL_NAME, | ||
RERANKER_TOP_K: RERANKER_TOP_K, | ||
LLM_FUNCTION_CALL: LLM_FUNCTION_CALL, | ||
@@ -287,3 +335,4 @@ RETRIEVAL_DOCUMENTS: RETRIEVAL_DOCUMENTS, | ||
USER_ID: USER_ID, | ||
// OpenInference steps | ||
METADATA: METADATA, | ||
TAG_TAGS: TAG_TAGS, | ||
OPENINFERENCE_SPAN_KIND: "".concat(SemanticAttributePrefixes.openinference, ".span.kind"), | ||
@@ -293,10 +342,11 @@ }; | ||
(function (OpenInferenceSpanKind) { | ||
OpenInferenceSpanKind["LLM"] = "llm"; | ||
OpenInferenceSpanKind["CHAIN"] = "chain"; | ||
OpenInferenceSpanKind["TOOL"] = "tool"; | ||
OpenInferenceSpanKind["RETRIEVER"] = "retriever"; | ||
OpenInferenceSpanKind["RERANKER"] = "reranker"; | ||
OpenInferenceSpanKind["EMBEDDING"] = "embedding"; | ||
OpenInferenceSpanKind["AGENT"] = "agent"; | ||
OpenInferenceSpanKind["GUARDRAIL"] = "guardrail"; | ||
OpenInferenceSpanKind["LLM"] = "LLM"; | ||
OpenInferenceSpanKind["CHAIN"] = "CHAIN"; | ||
OpenInferenceSpanKind["TOOL"] = "TOOL"; | ||
OpenInferenceSpanKind["RETRIEVER"] = "RETRIEVER"; | ||
OpenInferenceSpanKind["RERANKER"] = "RERANKER"; | ||
OpenInferenceSpanKind["EMBEDDING"] = "EMBEDDING"; | ||
OpenInferenceSpanKind["AGENT"] = "AGENT"; | ||
OpenInferenceSpanKind["GUARDRAIL"] = "GUARDRAIL"; | ||
OpenInferenceSpanKind["EVALUATOR"] = "EVALUATOR"; | ||
})(OpenInferenceSpanKind || (OpenInferenceSpanKind = {})); | ||
@@ -303,0 +353,0 @@ export var MimeType; |
@@ -238,2 +238,6 @@ /** | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
export declare const TOOL_PARAMETERS: "tool.parameters"; | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -246,3 +250,36 @@ */ | ||
export declare const USER_ID: "user.id"; | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
export declare const RERANKER_INPUT_DOCUMENTS: "reranker.input_documents"; | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
export declare const RERANKER_OUTPUT_DOCUMENTS: "reranker.output_documents"; | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
export declare const RERANKER_QUERY: "reranker.query"; | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
export declare const RERANKER_MODEL_NAME: "reranker.model_name"; | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
export declare const RERANKER_TOP_K: "reranker.top_k"; | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
export declare const METADATA: "metadata"; | ||
/** | ||
* A prompt template version | ||
*/ | ||
export declare const PROMPT_TEMPLATE_VERSION: "llm.prompt_template.version"; | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
export declare const TAG_TAGS: "tag.tags"; | ||
export declare const SemanticConventions: { | ||
readonly IMAGE_URL: "image.url"; | ||
readonly INPUT_VALUE: "input.value"; | ||
@@ -268,2 +305,6 @@ readonly INPUT_MIME_TYPE: "input.mime_type"; | ||
readonly MESSAGE_CONTENT: "message.content"; | ||
readonly MESSAGE_CONTENTS: "message.contents"; | ||
readonly MESSAGE_CONTENT_IMAGE: "message_content.image"; | ||
readonly MESSAGE_CONTENT_TEXT: "message_content.text"; | ||
readonly MESSAGE_CONTENT_TYPE: "message_content.type"; | ||
readonly DOCUMENT_ID: "document.id"; | ||
@@ -279,4 +320,11 @@ readonly DOCUMENT_CONTENT: "document.content"; | ||
readonly TOOL_NAME: "tool.name"; | ||
readonly TOOL_PARAMETERS: "tool.parameters"; | ||
readonly PROMPT_TEMPLATE_VARIABLES: "llm.prompt_template.variables"; | ||
readonly PROMPT_TEMPLATE_TEMPLATE: "llm.prompt_template.template"; | ||
readonly PROMPT_TEMPLATE_VERSION: "llm.prompt_template.version"; | ||
readonly RERANKER_INPUT_DOCUMENTS: "reranker.input_documents"; | ||
readonly RERANKER_OUTPUT_DOCUMENTS: "reranker.output_documents"; | ||
readonly RERANKER_QUERY: "reranker.query"; | ||
readonly RERANKER_MODEL_NAME: "reranker.model_name"; | ||
readonly RERANKER_TOP_K: "reranker.top_k"; | ||
readonly LLM_FUNCTION_CALL: "llm.function_call"; | ||
@@ -286,13 +334,16 @@ readonly RETRIEVAL_DOCUMENTS: "retrieval.documents"; | ||
readonly USER_ID: "user.id"; | ||
readonly METADATA: "metadata"; | ||
readonly TAG_TAGS: "tag.tags"; | ||
readonly OPENINFERENCE_SPAN_KIND: "openinference.span.kind"; | ||
}; | ||
export declare enum OpenInferenceSpanKind { | ||
LLM = "llm", | ||
CHAIN = "chain", | ||
TOOL = "tool", | ||
RETRIEVER = "retriever", | ||
RERANKER = "reranker", | ||
EMBEDDING = "embedding", | ||
AGENT = "agent", | ||
GUARDRAIL = "guardrail" | ||
LLM = "LLM", | ||
CHAIN = "CHAIN", | ||
TOOL = "TOOL", | ||
RETRIEVER = "RETRIEVER", | ||
RERANKER = "RERANKER", | ||
EMBEDDING = "EMBEDDING", | ||
AGENT = "AGENT", | ||
GUARDRAIL = "GUARDRAIL", | ||
EVALUATOR = "EVALUATOR" | ||
} | ||
@@ -299,0 +350,0 @@ export declare enum MimeType { |
@@ -239,2 +239,6 @@ /** | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
export const TOOL_PARAMETERS = `${SemanticAttributePrefixes.tool}.${ToolAttributePostfixes.parameters}`; | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -247,3 +251,36 @@ */ | ||
export const USER_ID = `${SemanticAttributePrefixes.user}.${UserAttributePostfixes.id}`; | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
export const RERANKER_INPUT_DOCUMENTS = `${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.input_documents}`; | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
export const RERANKER_OUTPUT_DOCUMENTS = `${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.output_documents}`; | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
export const RERANKER_QUERY = `${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.query}`; | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
export const RERANKER_MODEL_NAME = `${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.model_name}`; | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
export const RERANKER_TOP_K = `${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.top_k}`; | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
export const METADATA = "metadata"; | ||
/** | ||
* A prompt template version | ||
*/ | ||
export const PROMPT_TEMPLATE_VERSION = `${PROMPT_TEMPLATE_PREFIX}.version`; | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
export const TAG_TAGS = `${SemanticAttributePrefixes.tag}.${TagAttributePostfixes.tags}`; | ||
export const SemanticConventions = { | ||
IMAGE_URL, | ||
INPUT_VALUE, | ||
@@ -269,2 +306,6 @@ INPUT_MIME_TYPE, | ||
MESSAGE_CONTENT, | ||
MESSAGE_CONTENTS, | ||
MESSAGE_CONTENT_IMAGE, | ||
MESSAGE_CONTENT_TEXT, | ||
MESSAGE_CONTENT_TYPE, | ||
DOCUMENT_ID, | ||
@@ -280,4 +321,11 @@ DOCUMENT_CONTENT, | ||
TOOL_NAME, | ||
TOOL_PARAMETERS, | ||
PROMPT_TEMPLATE_VARIABLES, | ||
PROMPT_TEMPLATE_TEMPLATE, | ||
PROMPT_TEMPLATE_VERSION, | ||
RERANKER_INPUT_DOCUMENTS, | ||
RERANKER_OUTPUT_DOCUMENTS, | ||
RERANKER_QUERY, | ||
RERANKER_MODEL_NAME, | ||
RERANKER_TOP_K, | ||
LLM_FUNCTION_CALL, | ||
@@ -287,3 +335,4 @@ RETRIEVAL_DOCUMENTS, | ||
USER_ID, | ||
// OpenInference steps | ||
METADATA, | ||
TAG_TAGS, | ||
OPENINFERENCE_SPAN_KIND: `${SemanticAttributePrefixes.openinference}.span.kind`, | ||
@@ -293,10 +342,11 @@ }; | ||
(function (OpenInferenceSpanKind) { | ||
OpenInferenceSpanKind["LLM"] = "llm"; | ||
OpenInferenceSpanKind["CHAIN"] = "chain"; | ||
OpenInferenceSpanKind["TOOL"] = "tool"; | ||
OpenInferenceSpanKind["RETRIEVER"] = "retriever"; | ||
OpenInferenceSpanKind["RERANKER"] = "reranker"; | ||
OpenInferenceSpanKind["EMBEDDING"] = "embedding"; | ||
OpenInferenceSpanKind["AGENT"] = "agent"; | ||
OpenInferenceSpanKind["GUARDRAIL"] = "guardrail"; | ||
OpenInferenceSpanKind["LLM"] = "LLM"; | ||
OpenInferenceSpanKind["CHAIN"] = "CHAIN"; | ||
OpenInferenceSpanKind["TOOL"] = "TOOL"; | ||
OpenInferenceSpanKind["RETRIEVER"] = "RETRIEVER"; | ||
OpenInferenceSpanKind["RERANKER"] = "RERANKER"; | ||
OpenInferenceSpanKind["EMBEDDING"] = "EMBEDDING"; | ||
OpenInferenceSpanKind["AGENT"] = "AGENT"; | ||
OpenInferenceSpanKind["GUARDRAIL"] = "GUARDRAIL"; | ||
OpenInferenceSpanKind["EVALUATOR"] = "EVALUATOR"; | ||
})(OpenInferenceSpanKind || (OpenInferenceSpanKind = {})); | ||
@@ -303,0 +353,0 @@ export var MimeType; |
@@ -238,2 +238,6 @@ /** | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
export declare const TOOL_PARAMETERS: "tool.parameters"; | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -246,3 +250,36 @@ */ | ||
export declare const USER_ID: "user.id"; | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
export declare const RERANKER_INPUT_DOCUMENTS: "reranker.input_documents"; | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
export declare const RERANKER_OUTPUT_DOCUMENTS: "reranker.output_documents"; | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
export declare const RERANKER_QUERY: "reranker.query"; | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
export declare const RERANKER_MODEL_NAME: "reranker.model_name"; | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
export declare const RERANKER_TOP_K: "reranker.top_k"; | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
export declare const METADATA: "metadata"; | ||
/** | ||
* A prompt template version | ||
*/ | ||
export declare const PROMPT_TEMPLATE_VERSION: "llm.prompt_template.version"; | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
export declare const TAG_TAGS: "tag.tags"; | ||
export declare const SemanticConventions: { | ||
readonly IMAGE_URL: "image.url"; | ||
readonly INPUT_VALUE: "input.value"; | ||
@@ -268,2 +305,6 @@ readonly INPUT_MIME_TYPE: "input.mime_type"; | ||
readonly MESSAGE_CONTENT: "message.content"; | ||
readonly MESSAGE_CONTENTS: "message.contents"; | ||
readonly MESSAGE_CONTENT_IMAGE: "message_content.image"; | ||
readonly MESSAGE_CONTENT_TEXT: "message_content.text"; | ||
readonly MESSAGE_CONTENT_TYPE: "message_content.type"; | ||
readonly DOCUMENT_ID: "document.id"; | ||
@@ -279,4 +320,11 @@ readonly DOCUMENT_CONTENT: "document.content"; | ||
readonly TOOL_NAME: "tool.name"; | ||
readonly TOOL_PARAMETERS: "tool.parameters"; | ||
readonly PROMPT_TEMPLATE_VARIABLES: "llm.prompt_template.variables"; | ||
readonly PROMPT_TEMPLATE_TEMPLATE: "llm.prompt_template.template"; | ||
readonly PROMPT_TEMPLATE_VERSION: "llm.prompt_template.version"; | ||
readonly RERANKER_INPUT_DOCUMENTS: "reranker.input_documents"; | ||
readonly RERANKER_OUTPUT_DOCUMENTS: "reranker.output_documents"; | ||
readonly RERANKER_QUERY: "reranker.query"; | ||
readonly RERANKER_MODEL_NAME: "reranker.model_name"; | ||
readonly RERANKER_TOP_K: "reranker.top_k"; | ||
readonly LLM_FUNCTION_CALL: "llm.function_call"; | ||
@@ -286,13 +334,16 @@ readonly RETRIEVAL_DOCUMENTS: "retrieval.documents"; | ||
readonly USER_ID: "user.id"; | ||
readonly METADATA: "metadata"; | ||
readonly TAG_TAGS: "tag.tags"; | ||
readonly OPENINFERENCE_SPAN_KIND: "openinference.span.kind"; | ||
}; | ||
export declare enum OpenInferenceSpanKind { | ||
LLM = "llm", | ||
CHAIN = "chain", | ||
TOOL = "tool", | ||
RETRIEVER = "retriever", | ||
RERANKER = "reranker", | ||
EMBEDDING = "embedding", | ||
AGENT = "agent", | ||
GUARDRAIL = "guardrail" | ||
LLM = "LLM", | ||
CHAIN = "CHAIN", | ||
TOOL = "TOOL", | ||
RETRIEVER = "RETRIEVER", | ||
RERANKER = "RERANKER", | ||
EMBEDDING = "EMBEDDING", | ||
AGENT = "AGENT", | ||
GUARDRAIL = "GUARDRAIL", | ||
EVALUATOR = "EVALUATOR" | ||
} | ||
@@ -299,0 +350,0 @@ export declare enum MimeType { |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.PROMPT_TEMPLATE_VARIABLES = exports.RETRIEVAL_DOCUMENTS = exports.EMBEDDING_EMBEDDINGS = exports.EMBEDDING_VECTOR = exports.EMBEDDING_MODEL_NAME = exports.EMBEDDING_TEXT = exports.DOCUMENT_METADATA = exports.DOCUMENT_SCORE = exports.DOCUMENT_CONTENT = exports.DOCUMENT_ID = exports.IMAGE_URL = exports.MESSAGE_CONTENT_IMAGE = exports.MESSAGE_CONTENT_TEXT = exports.MESSAGE_CONTENT_TYPE = exports.MESSAGE_CONTENTS = exports.MESSAGE_CONTENT = exports.MESSAGE_FUNCTION_CALL_ARGUMENTS_JSON = exports.MESSAGE_FUNCTION_CALL_NAME = exports.TOOL_CALL_FUNCTION_ARGUMENTS_JSON = exports.TOOL_CALL_FUNCTION_NAME = exports.MESSAGE_TOOL_CALLS = exports.MESSAGE_NAME = exports.MESSAGE_ROLE = exports.LLM_TOKEN_COUNT_TOTAL = exports.LLM_TOKEN_COUNT_PROMPT = exports.LLM_TOKEN_COUNT_COMPLETION = exports.LLM_MODEL_NAME = exports.LLM_OUTPUT_MESSAGES = exports.LLM_INVOCATION_PARAMETERS = exports.LLM_PROMPTS = exports.LLM_INPUT_MESSAGES = exports.OUTPUT_MIME_TYPE = exports.OUTPUT_VALUE = exports.INPUT_MIME_TYPE = exports.INPUT_VALUE = exports.UserAttributePostfixes = exports.SessionAttributePostfixes = exports.TagAttributePostfixes = exports.DocumentAttributePostfixes = exports.ToolCallAttributePostfixes = exports.ImageAttributesPostfixes = exports.MessageContentsAttributePostfixes = exports.MessageAttributePostfixes = exports.ToolAttributePostfixes = exports.EmbeddingAttributePostfixes = exports.RerankerAttributePostfixes = exports.RetrievalAttributePostfixes = exports.LLMPromptTemplateAttributePostfixes = exports.LLMAttributePostfixes = exports.SemanticAttributePrefixes = void 0; | ||
exports.MimeType = exports.OpenInferenceSpanKind = exports.SemanticConventions = exports.USER_ID = exports.SESSION_ID = exports.TOOL_DESCRIPTION = exports.TOOL_NAME = exports.LLM_FUNCTION_CALL = exports.PROMPT_TEMPLATE_TEMPLATE = void 0; | ||
exports.MimeType = exports.OpenInferenceSpanKind = exports.SemanticConventions = exports.TAG_TAGS = exports.PROMPT_TEMPLATE_VERSION = exports.METADATA = exports.RERANKER_TOP_K = exports.RERANKER_MODEL_NAME = exports.RERANKER_QUERY = exports.RERANKER_OUTPUT_DOCUMENTS = exports.RERANKER_INPUT_DOCUMENTS = exports.USER_ID = exports.SESSION_ID = exports.TOOL_PARAMETERS = exports.TOOL_DESCRIPTION = exports.TOOL_NAME = exports.LLM_FUNCTION_CALL = exports.PROMPT_TEMPLATE_TEMPLATE = void 0; | ||
exports.SemanticAttributePrefixes = { | ||
@@ -244,2 +244,6 @@ input: "input", | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
exports.TOOL_PARAMETERS = `${exports.SemanticAttributePrefixes.tool}.${exports.ToolAttributePostfixes.parameters}`; | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -252,3 +256,36 @@ */ | ||
exports.USER_ID = `${exports.SemanticAttributePrefixes.user}.${exports.UserAttributePostfixes.id}`; | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
exports.RERANKER_INPUT_DOCUMENTS = `${exports.SemanticAttributePrefixes.reranker}.${exports.RerankerAttributePostfixes.input_documents}`; | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
exports.RERANKER_OUTPUT_DOCUMENTS = `${exports.SemanticAttributePrefixes.reranker}.${exports.RerankerAttributePostfixes.output_documents}`; | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
exports.RERANKER_QUERY = `${exports.SemanticAttributePrefixes.reranker}.${exports.RerankerAttributePostfixes.query}`; | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
exports.RERANKER_MODEL_NAME = `${exports.SemanticAttributePrefixes.reranker}.${exports.RerankerAttributePostfixes.model_name}`; | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
exports.RERANKER_TOP_K = `${exports.SemanticAttributePrefixes.reranker}.${exports.RerankerAttributePostfixes.top_k}`; | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
exports.METADATA = "metadata"; | ||
/** | ||
* A prompt template version | ||
*/ | ||
exports.PROMPT_TEMPLATE_VERSION = `${PROMPT_TEMPLATE_PREFIX}.version`; | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
exports.TAG_TAGS = `${exports.SemanticAttributePrefixes.tag}.${exports.TagAttributePostfixes.tags}`; | ||
exports.SemanticConventions = { | ||
IMAGE_URL: exports.IMAGE_URL, | ||
INPUT_VALUE: exports.INPUT_VALUE, | ||
@@ -274,2 +311,6 @@ INPUT_MIME_TYPE: exports.INPUT_MIME_TYPE, | ||
MESSAGE_CONTENT: exports.MESSAGE_CONTENT, | ||
MESSAGE_CONTENTS: exports.MESSAGE_CONTENTS, | ||
MESSAGE_CONTENT_IMAGE: exports.MESSAGE_CONTENT_IMAGE, | ||
MESSAGE_CONTENT_TEXT: exports.MESSAGE_CONTENT_TEXT, | ||
MESSAGE_CONTENT_TYPE: exports.MESSAGE_CONTENT_TYPE, | ||
DOCUMENT_ID: exports.DOCUMENT_ID, | ||
@@ -285,4 +326,11 @@ DOCUMENT_CONTENT: exports.DOCUMENT_CONTENT, | ||
TOOL_NAME: exports.TOOL_NAME, | ||
TOOL_PARAMETERS: exports.TOOL_PARAMETERS, | ||
PROMPT_TEMPLATE_VARIABLES: exports.PROMPT_TEMPLATE_VARIABLES, | ||
PROMPT_TEMPLATE_TEMPLATE: exports.PROMPT_TEMPLATE_TEMPLATE, | ||
PROMPT_TEMPLATE_VERSION: exports.PROMPT_TEMPLATE_VERSION, | ||
RERANKER_INPUT_DOCUMENTS: exports.RERANKER_INPUT_DOCUMENTS, | ||
RERANKER_OUTPUT_DOCUMENTS: exports.RERANKER_OUTPUT_DOCUMENTS, | ||
RERANKER_QUERY: exports.RERANKER_QUERY, | ||
RERANKER_MODEL_NAME: exports.RERANKER_MODEL_NAME, | ||
RERANKER_TOP_K: exports.RERANKER_TOP_K, | ||
LLM_FUNCTION_CALL: exports.LLM_FUNCTION_CALL, | ||
@@ -292,3 +340,4 @@ RETRIEVAL_DOCUMENTS: exports.RETRIEVAL_DOCUMENTS, | ||
USER_ID: exports.USER_ID, | ||
// OpenInference steps | ||
METADATA: exports.METADATA, | ||
TAG_TAGS: exports.TAG_TAGS, | ||
OPENINFERENCE_SPAN_KIND: `${exports.SemanticAttributePrefixes.openinference}.span.kind`, | ||
@@ -298,10 +347,11 @@ }; | ||
(function (OpenInferenceSpanKind) { | ||
OpenInferenceSpanKind["LLM"] = "llm"; | ||
OpenInferenceSpanKind["CHAIN"] = "chain"; | ||
OpenInferenceSpanKind["TOOL"] = "tool"; | ||
OpenInferenceSpanKind["RETRIEVER"] = "retriever"; | ||
OpenInferenceSpanKind["RERANKER"] = "reranker"; | ||
OpenInferenceSpanKind["EMBEDDING"] = "embedding"; | ||
OpenInferenceSpanKind["AGENT"] = "agent"; | ||
OpenInferenceSpanKind["GUARDRAIL"] = "guardrail"; | ||
OpenInferenceSpanKind["LLM"] = "LLM"; | ||
OpenInferenceSpanKind["CHAIN"] = "CHAIN"; | ||
OpenInferenceSpanKind["TOOL"] = "TOOL"; | ||
OpenInferenceSpanKind["RETRIEVER"] = "RETRIEVER"; | ||
OpenInferenceSpanKind["RERANKER"] = "RERANKER"; | ||
OpenInferenceSpanKind["EMBEDDING"] = "EMBEDDING"; | ||
OpenInferenceSpanKind["AGENT"] = "AGENT"; | ||
OpenInferenceSpanKind["GUARDRAIL"] = "GUARDRAIL"; | ||
OpenInferenceSpanKind["EVALUATOR"] = "EVALUATOR"; | ||
})(OpenInferenceSpanKind || (exports.OpenInferenceSpanKind = OpenInferenceSpanKind = {})); | ||
@@ -308,0 +358,0 @@ var MimeType; |
{ | ||
"name": "@arizeai/openinference-semantic-conventions", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -323,2 +323,8 @@ /** | ||
/** | ||
* The parameters of the tool represented as a JSON string | ||
*/ | ||
export const TOOL_PARAMETERS = | ||
`${SemanticAttributePrefixes.tool}.${ToolAttributePostfixes.parameters}` as const; | ||
/** | ||
* The session id of a trace. Used to correlate spans in a single session. | ||
@@ -335,3 +341,51 @@ */ | ||
/** | ||
* The documents used as input to the reranker | ||
*/ | ||
export const RERANKER_INPUT_DOCUMENTS = | ||
`${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.input_documents}` as const; | ||
/** | ||
* The documents output by the reranker | ||
*/ | ||
export const RERANKER_OUTPUT_DOCUMENTS = | ||
`${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.output_documents}` as const; | ||
/** | ||
* The query string for the reranker | ||
*/ | ||
export const RERANKER_QUERY = | ||
`${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.query}` as const; | ||
/** | ||
* The model name for the reranker | ||
*/ | ||
export const RERANKER_MODEL_NAME = | ||
`${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.model_name}` as const; | ||
/** | ||
* The top k parameter for the reranker | ||
*/ | ||
export const RERANKER_TOP_K = | ||
`${SemanticAttributePrefixes.reranker}.${RerankerAttributePostfixes.top_k}` as const; | ||
/** | ||
* Metadata for a span, used to store user-defined key-value pairs | ||
*/ | ||
export const METADATA = "metadata" as const; | ||
/** | ||
* A prompt template version | ||
*/ | ||
export const PROMPT_TEMPLATE_VERSION = | ||
`${PROMPT_TEMPLATE_PREFIX}.version` as const; | ||
/** | ||
* The tags associated with a span | ||
*/ | ||
export const TAG_TAGS = | ||
`${SemanticAttributePrefixes.tag}.${TagAttributePostfixes.tags}` as const; | ||
export const SemanticConventions = { | ||
IMAGE_URL, | ||
INPUT_VALUE, | ||
@@ -357,2 +411,6 @@ INPUT_MIME_TYPE, | ||
MESSAGE_CONTENT, | ||
MESSAGE_CONTENTS, | ||
MESSAGE_CONTENT_IMAGE, | ||
MESSAGE_CONTENT_TEXT, | ||
MESSAGE_CONTENT_TYPE, | ||
DOCUMENT_ID, | ||
@@ -368,4 +426,11 @@ DOCUMENT_CONTENT, | ||
TOOL_NAME, | ||
TOOL_PARAMETERS, | ||
PROMPT_TEMPLATE_VARIABLES, | ||
PROMPT_TEMPLATE_TEMPLATE, | ||
PROMPT_TEMPLATE_VERSION, | ||
RERANKER_INPUT_DOCUMENTS, | ||
RERANKER_OUTPUT_DOCUMENTS, | ||
RERANKER_QUERY, | ||
RERANKER_MODEL_NAME, | ||
RERANKER_TOP_K, | ||
LLM_FUNCTION_CALL, | ||
@@ -375,3 +440,4 @@ RETRIEVAL_DOCUMENTS, | ||
USER_ID, | ||
// OpenInference steps | ||
METADATA, | ||
TAG_TAGS, | ||
OPENINFERENCE_SPAN_KIND: `${SemanticAttributePrefixes.openinference}.span.kind`, | ||
@@ -381,10 +447,11 @@ } as const; | ||
export enum OpenInferenceSpanKind { | ||
LLM = "llm", | ||
CHAIN = "chain", | ||
TOOL = "tool", | ||
RETRIEVER = "retriever", | ||
RERANKER = "reranker", | ||
EMBEDDING = "embedding", | ||
AGENT = "agent", | ||
GUARDRAIL = "guardrail", | ||
LLM = "LLM", | ||
CHAIN = "CHAIN", | ||
TOOL = "TOOL", | ||
RETRIEVER = "RETRIEVER", | ||
RERANKER = "RERANKER", | ||
EMBEDDING = "EMBEDDING", | ||
AGENT = "AGENT", | ||
GUARDRAIL = "GUARDRAIL", | ||
EVALUATOR = "EVALUATOR", | ||
} | ||
@@ -391,0 +458,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
189274
12.85%2616
16.06%