[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J16ZWDC12WBQEV472YPEQF":3,"skill-same:01M6J16ZWDC12WBQEV472YPEQF":77},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6J16ZWDC12WBQEV472YPEQF","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\u002F.ai-rulez\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,36],"search","embeddings","liter llm","liter llm embeddings and search","web-search","running","when","reranking","with","embed","calling","web","methods","use","Providers","ocr","playbook","documents","2026-11-10 10:12:30",false,"---\ntype: Playbook\ntitle: Embeddings And Search\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.\nx-ai-rulez:\n  kind: skill\n  id: liter-llm-embeddings-and-search\n  metadata:\n    name: liter-llm-embeddings-and-search\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","# 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",{"type":42,"title":43,"x-ai-rulez":44,"description":7},"Playbook","Embeddings And Search",{"id":5,"kind":45,"metadata":46},"skill",{"name":5},"main","81dd58501327dc68d81676f236766c08c0d31deb","plugin\u002F.ai-rulez\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":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add xberg-io\u002Fliter-llm --skill liter-llm-embeddings-and-search",{"tool":63,"command":64},"bunx","bunx skills add xberg-io\u002Fliter-llm --skill liter-llm-embeddings-and-search",{"tool":66,"command":67},"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\u002F.ai-rulez\u002Fskills\u002Fliter-llm-embeddings-and-search\u002FSKILL.md",true,[71],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"index.md","REFERENCE","参考文档",247,"https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fplugin\u002F.ai-rulez\u002Fskills\u002Fliter-llm-embeddings-and-search\u002Findex.md",[78,101,117,135,152,174],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":37},"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",[],[21,34,85,19,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,25],"web search","rust","middleware","ruby","MCP","writing","image","mcp server","code","api","io","streaming","llms","server","native","elixir",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":37},"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",[],[89,92,108,98,21,109,110,111,112,29,113,32,114,115,116,25],"liter llm using the mcp server","launcher","decide","authentication","tool","auto","cli","sdk","Tools",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":37},"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",[],[124,112,29,125,21,126,127,128,129,32,130,131,132,116,133,134,25],"tool calling","liter llm tool calling","llm tool","for","calls","call","functions","json","formats","structured","outputs",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":37},"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",[],[142,21,96,143,144,145,146,147,32,148,149,150,151,25],"liter llm streaming responses","chat","delta","via","tokens","async","content","sse","chunks","stream",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":37},"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",[],[159,160,21,24,161,162,163,164,165,32,94,166,167,168,169,170,171,172,173,25],"proxy","liter llm running the proxy","openai-compatible","virtual","gateway","model","toml","cost","routing","REST","endpoints","keys","config","limits","llm api",{"skillNo":175,"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":176,"categories":177,"keywords":178,"publishedAt":37},"01M6J1D2W434JGGHXR8SP91PZ3","https:\u002F\u002Fgithub.com\u002Fxberg-io\u002Fliter-llm\u002Fblob\u002Fmain\u002Fskills\u002Fliter-llm-embeddings-and-search\u002FSKILL.md",[],[19,22,21,20,34,31,29,32,36,28,27,30,23,33,26,24,25]]