{"id":19341,"date":"2025-01-25T14:09:21","date_gmt":"2025-01-25T06:09:21","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=19341"},"modified":"2025-01-25T14:09:21","modified_gmt":"2025-01-25T06:09:21","slug":"llamaedge","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/pt\/llamaedge\/","title":{"rendered":"LlamaEdge\uff1a\u672c\u5730\u8fd0\u884c\u548c\u5fae\u8c03LLM\u7684\u6700\u5feb\u6377\u65b9\u5f0f"},"content":{"rendered":"<p>LlamaEdge\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u65e8\u5728\u7b80\u5316\u672c\u5730\u6216\u8fb9\u7f18\u8bbe\u5907\u4e0a\u8fd0\u884c\u548c\u5fae\u8c03\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u7684\u8fc7\u7a0b\u3002\u8be5\u9879\u76ee\u652f\u6301Llama2\u7cfb\u5217\u6a21\u578b\uff0c\u5e76\u63d0\u4f9b\u4e0eOpenAI\u517c\u5bb9\u7684API\u670d\u52a1\uff0c\u4f7f\u7528\u6237\u80fd\u591f\u8f7b\u677e\u521b\u5efa\u548c\u8fd0\u884cLLM\u63a8\u7406\u5e94\u7528\u7a0b\u5e8f\u3002LlamaEdge\u5229\u7528Rust\u548cWasm\u6280\u672f\u6808\uff0c\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u66ff\u4ee3\u65b9\u6848\u6765\u8fdb\u884cAI\u63a8\u7406\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684\u547d\u4ee4\u884c\u64cd\u4f5c\u5feb\u901f\u542f\u52a8\u548c\u8fd0\u884c\u6a21\u578b\uff0c\u5e76\u4e14\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u5fae\u8c03\u548c\u6269\u5c55\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u672c\u5730\u8fd0\u884cLLM<\/strong>\uff1a\u652f\u6301\u5728\u672c\u5730\u8bbe\u5907\u6216\u8fb9\u7f18\u8bbe\u5907\u4e0a\u8fd0\u884cLlama2\u7cfb\u5217\u6a21\u578b\u3002<\/li>\n<li><strong>OpenAI\u517c\u5bb9API\u670d\u52a1<\/strong>\uff1a\u63d0\u4f9b\u4e0eOpenAI API\u517c\u5bb9\u7684\u670d\u52a1\u7aef\u70b9\uff0c\u652f\u6301\u804a\u5929\u3001\u8bed\u97f3\u8f6c\u6587\u672c\u3001\u6587\u672c\u8f6c\u8bed\u97f3\u3001\u56fe\u50cf\u751f\u6210\u7b49\u529f\u80fd\u3002<\/li>\n<li><strong>\u8de8\u5e73\u53f0\u652f\u6301<\/strong>\uff1a\u652f\u6301\u591a\u79cdCPU\u548cGPU\u8bbe\u5907\uff0c\u63d0\u4f9b\u8de8\u5e73\u53f0\u7684Wasm\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li><strong>\u5feb\u901f\u542f\u52a8<\/strong>\uff1a\u901a\u8fc7\u7b80\u5355\u7684\u547d\u4ee4\u884c\u64cd\u4f5c\u5373\u53ef\u5feb\u901f\u4e0b\u8f7d\u548c\u8fd0\u884c\u6a21\u578b\u3002<\/li>\n<li><strong>\u5fae\u8c03\u548c\u6269\u5c55<\/strong>\uff1a\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u4fee\u6539\u548c\u6269\u5c55\u6e90\u4ee3\u7801\uff0c\u4ee5\u6ee1\u8db3\u7279\u5b9a\u9700\u6c42\u3002<\/li>\n<li><strong>\u6587\u6863\u548c\u6559\u7a0b<\/strong>\uff1a\u63d0\u4f9b\u8be6\u7ec6\u7684\u5b98\u65b9\u6587\u6863\u548c\u6559\u7a0b\uff0c\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u4e0a\u624b\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<ol>\n<li><strong>\u5b89\u88c5WasmEdge<\/strong>\uff1a\u9996\u5148\u9700\u8981\u5b89\u88c5WasmEdge\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u884c\u5b8c\u6210\uff1a<\/li>\n<\/ol>\n<pre><code>   curl -sSf https:\/\/raw.githubusercontent.com\/WasmEdge\/WasmEdge\/master\/utils\/install_v2.sh | bash\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>\u4e0b\u8f7dLLM\u6a21\u578b\u6587\u4ef6<\/strong>\uff1a\u4ee5Meta Llama 3.2 1B\u6a21\u578b\u4e3a\u4f8b\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4e0b\u8f7d\uff1a<\/li>\n<\/ol>\n<pre><code>   curl -LO https:\/\/huggingface.co\/second-state\/Llama-3.2-1B-Instruct-GGUF\/resolve\/main\/Llama-3.2-1B-Instruct-Q5_K_M.gguf\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>\u4e0b\u8f7dLlamaEdge CLI\u804a\u5929\u5e94\u7528<\/strong>\uff1a\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4e0b\u8f7d\u8de8\u5e73\u53f0\u7684Wasm\u5e94\u7528\u7a0b\u5e8f\uff1a<\/li>\n<\/ol>\n<pre><code>   curl -LO https:\/\/github.com\/second-state\/LlamaEdge\/releases\/latest\/download\/llama-chat.wasm\r\n<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>\u8fd0\u884c\u804a\u5929\u5e94\u7528<\/strong>\uff1a\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4e0eLLM\u8fdb\u884c\u804a\u5929\uff1a<\/li>\n<\/ol>\n<pre><code>   wasmedge --dir .:. --nn-preload default:GGML:AUTO:Llama-3.2-1B-Instruct-Q5_K_M.gguf llama-chat.wasm -p llama-3-chat\r\n<\/code><\/pre>\n<h3>\u529f\u80fd\u64cd\u4f5c\u6d41\u7a0b<\/h3>\n<ol>\n<li><strong>\u542f\u52a8API\u670d\u52a1<\/strong>\uff1a\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8API\u670d\u52a1\uff1a<\/li>\n<\/ol>\n<pre><code>   wasmedge --dir .:. --env API_KEY=your_api_key llama-api-server.wasm --model-name llama-3.2-1B --prompt-template llama-chat --reverse-prompt \"[INST]\" --ctx-size 32000\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528Web\u754c\u9762\u4e0eLLM\u4ea4\u4e92<\/strong>\uff1a\u542f\u52a8API\u670d\u52a1\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7Web\u754c\u9762\u4e0e\u672c\u5730LLM\u8fdb\u884c\u4ea4\u4e92\u3002<\/li>\n<li><strong>\u521b\u5efa\u81ea\u5b9a\u4e49API\u670d\u52a1<\/strong>\uff1a\u53ef\u4ee5\u6839\u636e\u9700\u8981\u521b\u5efa\u81ea\u5b9a\u4e49\u7684API\u670d\u52a1\u7aef\u70b9\uff0c\u4f8b\u5982\u8bed\u97f3\u8f6c\u6587\u672c\u3001\u6587\u672c\u8f6c\u8bed\u97f3\u3001\u56fe\u50cf\u751f\u6210\u7b49\u3002<\/li>\n<li><strong>\u5fae\u8c03\u548c\u6269\u5c55<\/strong>\uff1a\u7528\u6237\u53ef\u4ee5\u4fee\u6539\u6e90\u4ee3\u7801\u4e2d\u7684\u914d\u7f6e\u6587\u4ef6\u548c\u53c2\u6570\uff0c\u4ee5\u5b9e\u73b0\u7279\u5b9a\u7684\u529f\u80fd\u9700\u6c42\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>LlamaEdge \u5728\u7b14\u8bb0\u672c\u7535\u8111\u5feb\u901f\u8fd0\u884c\u84b8\u998f DeepSeek-R1<\/h2>\n<p>DeepSeek-R1\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u4e14\u7528\u9014\u5e7f\u6cdb\u7684 AI \u6a21\u578b\uff0c\u5b83\u51ed\u501f\u5148\u8fdb\u7684\u63a8\u7406\u80fd\u529b\u3001\u6210\u672c\u6548\u76ca\u548c\u5f00\u6e90\u53ef\u7528\u6027\u5411 OpenAI \u7b49\u8001\u724c\u4f01\u4e1a\u53d1\u8d77\u4e86\u6311\u6218\u3002\u867d\u7136\u5b83\u6709\u4e00\u4e9b\u5c40\u9650\u6027\uff0c\u4f46\u5176\u521b\u65b0\u7684\u65b9\u6cd5\u548c\u5f3a\u5927\u7684\u6027\u80fd\u4f7f\u5176\u6210\u4e3a\u5f00\u53d1\u4eba\u5458\u3001\u7814\u7a76\u4eba\u5458\u548c\u4f01\u4e1a\u7684\u5b9d\u8d35\u5de5\u5177\u3002\u5bf9\u4e8e\u90a3\u4e9b\u6709\u5174\u8da3\u63a2\u7d22\u5176\u529f\u80fd\u7684\u4eba\u6765\u8bf4\uff0c\u8be5\u6a21\u578b\u53ca\u5176\u7cbe\u7b80\u7248\u672c\u53ef\u4ee5\u5728 Hugging Face \u548c GitHub \u7b49\u5e73\u53f0\u4e0a\u83b7\u5f97\u3002<\/p>\n<p>\u7531\u53d7 GPU \u9650\u5236\u7684\u4e2d\u56fd\u56e2\u961f\u8bad\u7ec3\uff0c\u5b83\u5728\u6570\u5b66\u3001\u7f16\u7801\u751a\u81f3\u4e00\u4e9b\u76f8\u5f53\u590d\u6742\u7684\u63a8\u7406\u65b9\u9762\u8868\u73b0\u51fa\u8272\u3002\u6700\u6709\u8da3\u7684\u662f\uff0c\u5b83\u662f\u4e00\u4e2a\u201c\u7cbe\u7b80\u201d\u6a21\u578b\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u6bd4\u5b83\u6240\u57fa\u4e8e\u7684\u5de8\u578b\u6a21\u578b\u66f4\u5c0f\u3001\u66f4\u9ad8\u6548\u3002\u8fd9\u5f88\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u4f7f\u4eba\u4eec\u5728\u5b9e\u9645\u4f7f\u7528\u548c\u6784\u5efa\u5b83\u65f6\u66f4\u52a0\u5b9e\u7528\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"\" title=\"LlamaEdge\uff1a\u672c\u5730\u8fd0\u884c\u548c\u5fae\u8c03LLM\u7684\u6700\u5feb\u6377\u65b9\u5f0f-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/1cc9010c2f156dd.png\" alt=\"LlamaEdge\uff1a\u672c\u5730\u8fd0\u884c\u548c\u5fae\u8c03LLM\u7684\u6700\u5feb\u6377\u65b9\u5f0f-1\" width=\"745\" height=\"419\" \/><\/p>\n<p><strong>\u672c\u6587\u6211\u4eec\u5c06\u4ecb\u7ecd<\/strong><\/p>\n<ul>\n<li>\u5982\u4f55\u5728\u81ea\u5df1\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u5f00\u6e90 <a href=\"https:\/\/www.kdjingpai.com\/ja\/deepseek-chatshena\/\">DeepSeek<\/a> \u6a21\u578b<\/li>\n<li>\u5982\u4f55\u4f7f\u7528\u6700\u65b0\u7684 DeepSeek \u6a21\u578b\u521b\u5efa\u4e0e OpenAI \u517c\u5bb9\u7684 API \u670d\u52a1<\/li>\n<\/ul>\n<p>\u6211\u4eec\u5c06\u4f7f\u7528 LlamaEdge\uff08Rust + Wasm \u6280\u672f\u6808\uff09\u6765\u5f00\u53d1\u548c\u90e8\u7f72\u8fd9\u4e2a\u6a21\u578b\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u65e0\u9700\u5b89\u88c5\u590d\u6742\u7684 Python \u5305\u6216 C++ \u5de5\u5177\u94fe\uff01\u4e86\u89e3\u6211\u4eec\u9009\u62e9\u8fd9\u9879\u6280\u672f\u7684\u539f\u56e0\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u5728\u81ea\u5df1\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c DeepSeek-R1-Distill-Llama-8B \u6a21\u578b<\/h3>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u884c\u5b89\u88c5WasmEge\u3002<\/strong><\/p>\n<pre><code>curl\u00a0-sSf\u00a0https:\/\/raw.githubusercontent.com\/WasmEdge\/WasmEdge\/master\/utils\/install_v2.sh\u00a0|\u00a0bash\u00a0-s\u00a0--\u00a0-v\u00a00.14.1\r\n<\/code><\/pre>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u4e0b\u8f7d\u91cf\u5316\u8fc7\u7684DeepSeek-R1-Distill-Llama-8B-GGUF\u6a21\u578b\u6587\u4ef6\u3002<\/strong><\/p>\n<p>\u8fd9\u53ef\u80fd\u9700\u8981\u4e00\u5b9a\u65f6\u95f4\uff0c\u56e0\u4e3a\u6a21\u578b\u7684\u5927\u5c0f\u4e3a 5.73 GB\u3002<\/p>\n<pre><code>curl\u00a0-LO\u00a0https:\/\/huggingface.co\/second-state\/DeepSeek-R1-Distill-Llama-8B-GGUF\/resolve\/main\/DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf`\r\n<\/code><\/pre>\n<p><strong>\u7b2c\u4e09\u6b65\uff1a\u4e0b\u8f7d LlamaEdge API \u670d\u52a1\u5668\u5e94\u7528\u7a0b\u5e8f\u3002<\/strong><\/p>\n<p>\u5b83\u4e5f\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u4fbf\u53ef\u79fb\u690d\u7684 Wasm \u5e94\u7528\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u5728\u8bb8\u591a CPU \u548c GPU \u8bbe\u5907\u4e0a\u8fd0\u884c\u3002<\/p>\n<pre><code>curl\u00a0-LO\u00a0https:\/\/github.com\/LlamaEdge\/LlamaEdge\/releases\/latest\/download\/llama-api-server.wasm\r\n<\/code><\/pre>\n<p><strong>\u7b2c\u56db\u6b65: \u4e0b\u8f7dchatbot UI<\/strong><\/p>\n<p>\u4ee5\u4fbf\u5728\u6d4f\u89c8\u5668\u4e2d\u4e0e DeepSeek-R1-Distill-Llama-8B \u6a21\u578b\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<pre>curl\u00a0-LO\u00a0https:\/\/github.com\/LlamaEdge\/chatbot-ui\/releases\/latest\/download\/chatbot-ui.tar.gz\r\ntar\u00a0xzf\u00a0chatbot-ui.tar.gz\r\nrm\u00a0chatbot-ui.tar.gz<\/pre>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u884c\u4e3a\u6a21\u578b\u542f\u52a8 LlamaEdge API \u670d\u52a1\u5668\u3002<\/p>\n<pre>wasmedge\u00a0--dir\u00a0.:.\u00a0--nn-preload\u00a0default:GGML:AUTO:DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf\u00a0\\\r\n\u00a0\u00a0llama-api-server.wasm\u00a0\\\r\n\u00a0\u00a0--prompt-template\u00a0llama-3-chat\u00a0\\\r\n\u00a0\u00a0--ctx-size\u00a08096<\/pre>\n<p>\u7136\u540e\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:8080 \u5f00\u59cb\u804a\u5929\uff01\u6216\u8005\u53ef\u4ee5\u5411\u6a21\u578b\u53d1\u9001 API \u8bf7\u6c42\u3002<\/p>\n<pre>curl\u00a0-X\u00a0POST\u00a0http:\/\/localhost:8080\/v1\/chat\/completions\u00a0\\\r\n\u00a0\u00a0-H\u00a0'accept:application\/json'\u00a0\\\r\n\u00a0\u00a0-H\u00a0'Content-Type:\u00a0application\/json'\u00a0\\\r\n\u00a0\u00a0-d\u00a0'{\"messages\":[{\"role\":\"system\",\u00a0\"content\":\u00a0\"You\u00a0are\u00a0a\u00a0helpful\u00a0assistant.\"},\u00a0{\"role\":\"user\",\u00a0\"content\":\u00a0\"What\u00a0is\u00a0the\u00a0capital\u00a0of\u00a0France?\"}],\u00a0\"model\":\u00a0\"DeepSeek-R1-Distill-Llama-8B\"}'\r\n\u00a0\u00a0\r\n{\"id\":\"chatcmpl-68158f69-8577-4da2-a24b-ae8614f88fea\",\"object\":\"chat.completion\",\"created\":1737533170,\"model\":\"default\",\"choices\":[{\"index\":0,\"message\":{\"content\":\"The\u00a0capital\u00a0of\u00a0France\u00a0is\u00a0Paris.\\n&lt;\/think&gt;\\n\\nThe\u00a0capital\u00a0of\u00a0France\u00a0is\u00a0Paris.&lt;\uff5cend\u2581of\u2581sentence\uff5c&gt;\",\"role\":\"assistant\"},\"finish_reason\":\"stop\",\"logprobs\":null}],\"usage\":{\"prompt_tokens\":34,\"completion_tokens\":18,\"total_tokens\":52}}<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u4e3a DeepSeek-R1-Distill-Llama-8B \u521b\u5efa\u4e0e OpenAI \u517c\u5bb9\u7684 API \u670d\u52a1<\/h3>\n<p>LlamaEdge \u662f\u8f7b\u91cf\u7ea7\u7684\uff0c\u4e0d\u9700\u8981\u5b88\u62a4\u8fdb\u7a0b\u6216 sudo \u8fdb\u7a0b\u5373\u53ef\u8fd0\u884c\u3002\u5b83\u53ef\u4ee5\u8f7b\u677e\u5d4c\u5165\u5230\u60a8\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff01\u901a\u8fc7\u652f\u6301\u804a\u5929\u548c embedding \u6a21\u578b\uff0cLlamaEdge \u53ef\u4ee5\u6210\u4e3a\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u5e94\u7528\u7a0b\u5e8f\u5185\u90e8\u7684 OpenAI API \u66ff\u4ee3\u54c1\uff01<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u5c55\u793a\u5982\u4f55\u4e3a <a href=\"https:\/\/www.kdjingpai.com\/ja\/deepseek-r1nenglixiang\/\">DeepSeek-R1<\/a> \u6a21\u578b\u4ee5\u53ca embedding \u6a21\u578b\u542f\u52a8\u5b8c\u6574\u7684 API \u670d\u52a1\u5668\u3002API \u670d\u52a1\u5668\u5c06\u5177\u6709 <code>chat\/completions <\/code>\u548c <code>embeddings <\/code>\u7aef\u70b9\u3002\u9664\u4e86\u4e0a\u4e00\u8282\u4e2d\u7684\u6b65\u9aa4\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u9700\u8981\uff1a<\/p>\n<p><strong>\u7b2c\u4e94\u6b65\uff1a\u4e0b\u8f7d embedding \u6a21\u578b\u3002<\/strong><\/p>\n<pre><code>curl\u00a0-LO\u00a0https:\/\/huggingface.co\/second-state\/Nomic-embed-text-v1.5-Embedding-GGUF\/resolve\/main\/nomic-embed-text-v1.5.f16.gguf\r\n<\/code><\/pre>\n<p>\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u884c\u542f\u52a8\u5177\u6709\u804a\u5929\u548c embedding \u6a21\u578b\u7684 LlamaEdge API \u670d\u52a1\u5668\u3002\u66f4\u8be6\u7ec6\u7684\u8bf4\u660e\uff0c\u8bf7\u67e5\u770b\u6587\u6863\u2014\u2014\u542f\u52a8 LlamaEdge API \u670d\u52a1\u3002<\/p>\n<pre>wasmedge\u00a0--dir\u00a0.:.\u00a0\\\r\n--nn-preload\u00a0default:GGML:AUTO:DeepSeek-R1-Distill-Llama-8B-Q5_K_M.gguf\u00a0\\\r\n--nn-preload\u00a0embedding:GGML:AUTO:nomic-embed-text-v1.5.f16.gguf\u00a0\\\r\nllama-api-server.wasm\u00a0-p\u00a0llama-3-chat,embedding\u00a0\\\r\n--model-name\u00a0DeepSeek-R1-Distill-Llama-8B,nomic-embed-text-v1.5.f16\u00a0\\\r\n--ctx-size\u00a08192,8192\u00a0\\\r\n--batch-size\u00a0128,8192\u00a0\\\r\n--log-prompts\u00a0--log-stat<\/pre>\n<p>&nbsp;<\/p>\n<p>\u6700\u540e\uff0c\u53ef\u4ee5\u6309\u7167\u8fd9\u4e9b\u6559\u7a0b\u5c06 LlamaEdge API \u670d\u52a1\u5668\u4f5c\u4e3a OpenAI \u7684\u66ff\u4ee3\u4e0e\u5176\u4ed6 Agent \u6846\u67b6\u96c6\u6210\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5728\u4f60\u7684\u5e94\u7528\u6216 Agent \u914d\u7f6e\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u503c\u6765\u66ff\u6362 OpenAI API\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>Config option<\/th>\n<th>\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Base API URL<\/td>\n<td>http:\/\/localhost:8080\/v1<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u540d\u79f0 (\u5927\u6a21\u578b)<\/td>\n<td>DeepSeek-R1-Distill-Llama-8B<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u540d\u79f0 (\u6587\u672c embedding)<\/td>\n<td>nomic-embed<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5c31\u662f\u8fd9\u6837\u5566\uff01\u7acb\u5373\u8bbf\u95ee LlamaEdge \u4ed3\u5e93\u5e76\u6784\u5efa\u4f60\u7684\u7b2c\u4e00\u4e2a AI Agent\uff01\u5982\u679c\u89c9\u5f97\u6709\u610f\u601d\uff0c\u8bf7\u5728\u6b64\u5904\u4e3a\u6211\u4eec\u7684repo\u52a0\u6ce8\u661f\u6807\u3002\u5728\u8fd0\u884c\u6b64\u6a21\u578b\u65f6\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u4e5f\u53ef\u4ee5\u8bf7\u524d\u5f80\u8be5 repo \u63d0\u51fa\u95ee\u9898\u6216\u4e0e\u6211\u4eec\u9884\u7ea6\u6f14\u793a\uff0c\u4ee5\u8de8\u8bbe\u5907\u8fd0\u884c\u81ea\u5df1\u7684 LLM\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LlamaEdge\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u65e8\u5728\u7b80\u5316\u672c\u5730\u6216\u8fb9\u7f18\u8bbe\u5907\u4e0a\u8fd0\u884c\u548c\u5fae\u8c03\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u7684\u8fc7\u7a0b\u3002\u8be5\u9879\u76ee\u652f\u6301Llama2\u7cfb\u5217\u6a21\u578b\uff0c\u5e76\u63d0\u4f9b\u4e0eOpenAI\u517c\u5bb9\u7684API\u670d\u52a1\uff0c\u4f7f\u7528\u6237\u80fd\u591f\u8f7b\u677e\u521b\u5efa\u548c\u8fd0\u884cLLM\u63a8\u7406\u5e94\u7528\u7a0b\u5e8f\u3002LlamaEdge\u5229\u7528Rus&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61714,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,365],"class_list":["post-19341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-damoxingweidiao"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/19341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/comments?post=19341"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/posts\/19341\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media\/61714"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/media?parent=19341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/categories?post=19341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/pt\/wp-json\/wp\/v2\/tags?post=19341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}