[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J1C09R98SS378CKM2AH5HV":3,"skill-same:01M6J1C09R98SS378CKM2AH5HV":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6J1C09R98SS378CKM2AH5HV","liter-llm-embeddings-and-search",null,"Use when generating embeddings, calling the 12 web-search providers, or running OCR over documents with the 4 OCR providers through liter-llm. Covers embed, search, and ocr methods plus reranking.","xberg-io\u002Fliter-llm","xberg-io","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F241328462?v=4","01M6BYYMACFMK5WNT338Y71K58","Xberg.io","01M6J160RA8VS7XVE01W9305F3",266,"MIT","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fliter-llm-embeddings-and-search\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"liter llm embeddings and search","liter llm","embeddings","search","when","running","reranking","Providers","web-search","web","with","embed","documents","use","calling","methods","ocr","2026-11-10 10:12:30",false,"---\ndescription: Use when generating embeddings, calling the 12 web-search providers, or running OCR over documents with the 4 OCR providers through liter-llm. Covers embed, search, and ocr methods plus reranking.\nname: liter-llm-embeddings-and-search\n---\n\n\u003C!--\nAI-RULEZ :: GENERATED FILE — DO NOT EDIT\nContent-Hash: blake3:b5eb4ea6ac25a0cf5bda7f68424924e9760e43055ad34b314f5030588a6c3fc8\nSource-Hash: blake3:5cf7da08639f3cd0e9bdba8885263d112aa48add74b30d732da1f72fd7badd56\nSchema-Version: v1\n-->\n\n# Embeddings and Search\n\nliter-llm exposes embeddings, web search (12 providers), OCR (4 providers), and\nreranking through the same `provider\u002Fmodel` routing convention.\n\n## Embeddings\n\n```python\nimport asyncio, os\nfrom liter_llm import create_client\nfrom liter_llm._internal_bindings import EmbeddingRequest\n\nasync def main() -> None:\n    client = create_client(api_key=os.environ[\"OPENAI_API_KEY\"])\n    request = EmbeddingRequest.from_json(\n        '{\"model\":\"openai\u002Ftext-embedding-3-small\",\"input\":[\"first document\",\"second document\"]}'\n    )\n    response = await client.embed(request)\n    for item in response.data:\n        print(len(item.embedding))\n\nasyncio.run(main())\n```\n\nMany embedding models support dimension selection and base64 output; set\n`dimensions` \u002F `encoding_format` in the request where the provider allows it.\n\n## Web search (12 providers)\n\n```python\nfrom liter_llm._internal_bindings import SearchRequest\n\nclient = create_client(api_key=os.environ[\"BRAVE_API_KEY\"])\nrequest = SearchRequest.from_json(\n    '{\"model\":\"brave\u002Fweb-search\",\"query\":\"What is the Rust programming language?\",\"max_results\":5}'\n)\nresponse = await client.search(request)\nfor result in response.results:\n    print(result.title, result.url)\n```\n\n## OCR (4 providers)\n\n```python\nfrom liter_llm._internal_bindings import OcrRequest\n\nclient = create_client(api_key=os.environ[\"MISTRAL_API_KEY\"])\nrequest = OcrRequest.from_json(\n    '{\"model\":\"mistral\u002Fmistral-ocr-latest\",'\n    '\"document\":{\"type\":\"document_url\",\"url\":\"https:\u002F\u002Fexample.com\u002Finvoice.pdf\"}}'\n)\nresponse = await client.ocr(request)\nfor page in response.pages:\n    print(page.index, page.markdown[:100])\n```\n\n## Reranking\n\nBuild a `RerankRequest` (model, query, documents) and call `client.rerank(request)`\nto score and order candidate documents against a query for retrieval pipelines —\ncombine it with `embed` for hybrid retrieval. Each result carries `index` and\n`relevance_score`. Routing follows the same `provider\u002Fmodel` convention.\n\n## Notes\n\n- Search and OCR providers each need their own API key (e.g. `BRAVE_API_KEY`,\n  `MISTRAL_API_KEY`); read them from env vars.\n- See the upstream provider reference for the full list of the 12 search and 4\n  OCR backends and their model identifiers.\n","\u003C!--\nAI-RULEZ :: GENERATED FILE — DO NOT EDIT\nContent-Hash: blake3:b5eb4ea6ac25a0cf5bda7f68424924e9760e43055ad34b314f5030588a6c3fc8\nSource-Hash: blake3:5cf7da08639f3cd0e9bdba8885263d112aa48add74b30d732da1f72fd7badd56\nSchema-Version: v1\n-->\n\n# Embeddings and Search\n\nliter-llm exposes embeddings, web search (12 providers), OCR (4 providers), and\nreranking through the same `provider\u002Fmodel` routing convention.\n\n## Embeddings\n\n```python\nimport asyncio, os\nfrom liter_llm import create_client\nfrom liter_llm._internal_bindings import EmbeddingRequest\n\nasync def main() -> None:\n    client = create_client(api_key=os.environ[\"OPENAI_API_KEY\"])\n    request = EmbeddingRequest.from_json(\n        '{\"model\":\"openai\u002Ftext-embedding-3-small\",\"input\":[\"first document\",\"second document\"]}'\n    )\n    response = await client.embed(request)\n    for item in response.data:\n        print(len(item.embedding))\n\nasyncio.run(main())\n```\n\nMany embedding models support dimension selection and base64 output; set\n`dimensions` \u002F `encoding_format` in the request where the provider allows it.\n\n## Web search (12 providers)\n\n```python\nfrom liter_llm._internal_bindings import SearchRequest\n\nclient = create_client(api_key=os.environ[\"BRAVE_API_KEY\"])\nrequest = SearchRequest.from_json(\n    '{\"model\":\"brave\u002Fweb-search\",\"query\":\"What is the Rust programming language?\",\"max_results\":5}'\n)\nresponse = await client.search(request)\nfor result in response.results:\n    print(result.title, result.url)\n```\n\n## OCR (4 providers)\n\n```python\nfrom liter_llm._internal_bindings import OcrRequest\n\nclient = create_client(api_key=os.environ[\"MISTRAL_API_KEY\"])\nrequest = OcrRequest.from_json(\n    '{\"model\":\"mistral\u002Fmistral-ocr-latest\",'\n    '\"document\":{\"type\":\"document_url\",\"url\":\"https:\u002F\u002Fexample.com\u002Finvoice.pdf\"}}'\n)\nresponse = await client.ocr(request)\nfor page in response.pages:\n    print(page.index, page.markdown[:100])\n```\n\n## Reranking\n\nBuild a `RerankRequest` (model, query, documents) and call `client.rerank(request)`\nto score and order candidate documents against a query for retrieval pipelines —\ncombine it with `embed` for hybrid retrieval. Each result carries `index` and\n`relevance_score`. Routing follows the same `provider\u002Fmodel` convention.\n\n## Notes\n\n- Search and OCR providers each need their own API key (e.g. `BRAVE_API_KEY`,\n  `MISTRAL_API_KEY`); read them from env vars.\n- See the upstream provider reference for the full list of the 12 search and 4\n  OCR backends and their model identifiers.\n",{"name":5,"description":7},"main","ac77dad5017239b5ac3652414d6ad6583fb779a9","plugin\u002Fskills\u002Fliter-llm-embeddings-and-search",27,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm","https:\u002F\u002Fdocs.liter-llm.xberg.io","https:\u002F\u002Fgithub.com\u002Fxberg-io","https:\u002F\u002Fxberg.io","Open-source content intelligence with a Rust core: documents, web, LLMs and code, with native bindings for every major language.","2026-11-14 23:17:35",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add xberg-io\u002Fliter-llm --skill liter-llm-embeddings-and-search",{"tool":57,"command":58},"bunx","bunx skills add xberg-io\u002Fliter-llm --skill liter-llm-embeddings-and-search",{"tool":60,"command":61},"pnpm","pnpm dlx skills add xberg-io\u002Fliter-llm --skill liter-llm-embeddings-and-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fliter-llm-embeddings-and-search\u002FSKILL.md",true,[65],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"index.md","REFERENCE","参考文档",490,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fliter-llm-embeddings-and-search\u002Findex.md",[72,108,126,144,161,183],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":91,"publishedAt":36},"01M6J1DRP0968S21HH1C4HR9RK","liter-llm","Universal LLM API client for 174 providers with native bindings for 14 languages. Use when writing code that calls LLM APIs via liter-llm in Python, TypeScript, Rust, Go, Java, C#, Ruby, PHP, Elixir, WASM, or C, when running the OpenAI-compatible proxy, or when calling LLMs through the MCP server. Covers chat, streaming, tool calling, embeddings, image generation, speech, transcription, moderation, web search, OCR, reranking, provider routing, middleware, and configuration.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm\u002FSKILL.md",[78,83,86],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":87,"categoryName":88,"taxonomyType":89,"taxonomyTypeDesc":90},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[20,35,92,22,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,23],"web search","rust","middleware","ruby","MCP","writing","image","mcp server","code","api","io","streaming","llms","server","native","elixir",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":116,"publishedAt":36},"01M6J1DK94H9KDPW62F1E96VRR","liter-llm-using-the-mcp-server","Use when calling LLM APIs through the liter-llm MCP server's 22 tools, and to decide when MCP beats the CLI or SDK. Covers the tool surface, the auto-installing launcher, and authentication.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-using-the-mcp-server\u002FSKILL.md",[114,115],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},[96,99,117,105,20,118,119,120,121,33,122,32,123,124,125,23],"liter llm using the mcp server","launcher","decide","authentication","tool","auto","cli","sdk","Tools",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":36},"01M6J1DEEPNVQ3E5CX5ZF69416","liter-llm-tool-calling","Use when defining functions\u002Ftools for an LLM to call through liter-llm, or requesting structured JSON outputs. Covers tool schemas, tool_calls handling, and response formats.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-tool-calling\u002FSKILL.md",[],[133,121,33,134,20,135,136,137,138,32,139,140,141,125,142,143,23],"tool calling","liter llm tool calling","llm tool","for","calls","call","functions","json","formats","structured","outputs",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":36},"01M6J1DBN4XD93NN04WA8ZP75H","liter-llm-streaming-responses","Use when streaming tokens incrementally from an LLM via liter-llm over SSE or async iterators. Covers chat_stream, delta handling, and null-content chunks.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-streaming-responses\u002FSKILL.md",[],[151,20,103,152,153,154,155,156,32,157,158,159,160,23],"liter llm streaming responses","chat","delta","via","tokens","async","content","sse","chunks","stream",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":36},"01M6J1D76FTYTKSPWNNRVZ2PX3","liter-llm-running-the-proxy","Use when running the `liter-llm api` OpenAI-compatible gateway — virtual keys, per-key rate limits, budgets, cost tracking, and model routing. Covers the TOML config and the 22 REST endpoints.","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-running-the-proxy\u002FSKILL.md",[],[168,169,20,24,170,171,172,173,174,32,101,175,176,177,178,179,180,181,182,23],"proxy","liter llm running the proxy","openai-compatible","virtual","gateway","model","toml","cost","routing","REST","endpoints","keys","config","limits","llm api",{"skillNo":184,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":36},"01M6J1D2W434JGGHXR8SP91PZ3","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-embeddings-and-search\u002FSKILL.md",[],[22,19,20,21,35,34,33,32,31,30,29,28,27,26,25,24,23]]