Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /BerriAI_litellm /litellm /compression /retrieval_tool.py
| """ | |
| Build the litellm_content_retrieve tool definition for the LLM. | |
| """ | |
| def build_retrieval_tool(available_keys: list[str]) -> dict: | |
| """ | |
| Return an OpenAI-format tool definition that lets the model | |
| retrieve the full content of a compressed message. | |
| """ | |
| return { | |
| "type": "function", | |
| "function": { | |
| "name": "litellm_content_retrieve", | |
| "description": ( | |
| "Retrieve the full content of a file or message that was " | |
| "compressed to save tokens. Use this when you need the complete " | |
| "content to answer accurately. Available keys: " + ", ".join(available_keys) | |
| ), | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "key": { | |
| "type": "string", | |
| "description": "The identifier of the content to retrieve", | |
| "enum": available_keys, | |
| } | |
| }, | |
| "required": ["key"], | |
| }, | |
| }, | |
| } | |
Xet Storage Details
- Size:
- 1.08 kB
- Xet hash:
- 5514339d1d3279731c41e1d6e3cb4b9ee1326b0ff2c5306482eba7b76f18e916
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.