Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

semantic conventions for tool calls #36

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion trace/spec/semantic_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ The following attributes are reserved and MUST be supported by all OpenInference
| `message.function_call_name` | String | `"multiply"` or `"subtract"` | Function call function name |
| `message.function_call_arguments_json` | JSON String | `"{ 'x': 2 }"` | The arguments to the function call in JSON |
| `message.content` | String | `"What's the weather today?"` | The content of a message in a chat |
| `message.tool_calls` | List of objects | `[{"tool_call.function.name": "get_current_weather"}]` | List of tool calls (e.g. function calls) generated by the LLM |
| `tool_call.function.name` | String | `get_current_weather` | The name of the function being invoked by a tool call |
| `tool_call.function.arguments` | JSON string | `"{'city': 'London'}"` | The arguments for the function being invoked by a tool call |
| `llm.model_name` | String | `"gpt-3.5-turbo"` | The name of the language model being utilized |
| `llm.prompt_template.template` | String | `"Weather forecast for {city} on {date}"` | Template used to generate prompts as Python f-strings |
| `llm.prompt_template.variables` | List of strings | `["city", "date"]` | List of variables to be used in the prompt template |
Expand All @@ -46,7 +49,7 @@ The following attributes are reserved and MUST be supported by all OpenInference
| `reranker.input_documents` | List of objects | `[{"document.id": "1", "document.score": 0.9, "document.content": "..."}]` | List of documents as input to the reranker |
| `reranker.output_documents` | List of objects | `[{"document.id": "1", "document.score": 0.9, "document.content": "..."}]` | List of documents outputted by the reranker |
| `reranker.query` | String | `"How to format timestamp?"` | Query parameter of the reranker |
| `reranker.model_name` | String | `"cross-encoder/ms-marco-MiniLM-L-12-v2"` | Model name of the reranker |
| `reranker.model_name` | String | `"cross-encoder/ms-marco-MiniLM-L-12-v2"` | Model name of the reranker |
| `reranker.top_k` | Integer | 3 | Top K parameter of the reranker |

Note: the `object` type refers to a set of key-value pairs also known as a `struct`, `mapping`, `dictionary`, etc.