Skip to main content

GEN_AI_TOOL_DEFINITIONS

Constant GEN_AI_TOOL_DEFINITIONS 

pub const GEN_AI_TOOL_DEFINITIONS: &'static str;
👎Deprecated:

{note: Moved to the OpenTelemetry GenAI semantic conventions repository. , reason: uncategorized}

Available on crate features opentelemetry and semconv_experimental only.
Expand description

The list of tool definitions available to the GenAI agent or model.

§Notes

Instrumentations MUST follow Tool Definitions JSON Schema.

When the attribute is recorded on events, it MUST be recorded in structured form. When recorded on spans, it MAY be recorded as a JSON string if structured format is not supported and SHOULD be recorded in structured form otherwise.

Since this attribute could be large, it’s NOT RECOMMENDED to populate non-required properties by default. Instrumentations MAY provide a way to enable populating optional properties.

§Examples

  • "[\n {\n \"type\": \"function\",\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\n \"celsius\",\n \"fahrenheit\"\n ]\n }\n },\n \"required\": [\n \"location\",\n \"unit\"\n ]\n }\n }\n]\n"