[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-686339-105":59,"doc-detail-686339-en":130,"doc-similar-686339":154},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","unified-interface-for-large-language-model-interactions-version-100","Unified Interface for Large Language Model Interactions - Version 1.0.0","","Unified Interface for Large Language Model Interactions provides a single interface to work with large language models across multiple providers, including OpenAI, Ollama, and other OpenAI-compatible APIs. The package supports automatic connection testing, automatic adjustment of max_tokens, and structured JSON responses with schema validation. It also offers interactive JSON schema generation, prompt templating, and comprehensive diagnostics to help troubleshoot provider connectivity and request/response formatting issues. Licensed under GPL (>= 3).",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/unified-interface-for-large-language-model-interactions-version-100/686339/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/unified-interface-for-large-language-model-interactions-version-100/686339.png","ImageObject",300,407,{"name":92,"@type":93},"supergirl","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-19","2026-11-07",true,{"@type":102,"interactionType":103,"userInteractionCount":34},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does llmhelper’s unified interface provide?","Question",{"text":112,"@type":113},"It provides a unified interface for interacting with large language models through multiple providers such as OpenAI and Ollama, including OpenAI-compatible APIs.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the package validate and structure LLM outputs?",{"text":117,"@type":113},"It supports structured JSON responses with schema validation and can generate interactive JSON schemas to guide response formatting.",{"name":119,"@type":110,"acceptedAnswer":120},"What tools are available for diagnosing connection issues?",{"text":121,"@type":113},"diagnose_llm_connection performs comprehensive diagnostics across connectivity, endpoint access, authentication, and (optionally) tidyprompt compatibility.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},686339,1794037349,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":34,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":14,"preview_urls":145},962088121634,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Package: llmhelper (via r-universe)  \nOctober 27, 2026  \nType Package  \nTitle Unified Interface for Large Language Model Interactions Version 1.0.0  \nDescription Provides a unified interface for interacting with Large  \nLanguage Models (LLMs) through various providers including  \nOpenAI \u003C[https://platform.openai.com/docs/api-reference](https://platform.openai.com/docs/api-reference)>, Ollama \u003C[https://ollama.com/](https://ollama.com/)>, and other OpenAI-compatible APIs.  \nFeatures include automatic connection testing, max_tokens limit  \nauto-adjustment, structured JSON responses with schema  \nvalidation, interactive JSON schema generation, prompt  \ntemplating, and comprehensive diagnostics.  \nLicense GPL (>= 3)  \nURL [https://github.com/Zaoqu-Liu/llmhelper](https://github.com/Zaoqu-Liu/llmhelper)  \nBugReports [https://github.com/Zaoqu-Liu/llmhelper/issues](https://github.com/Zaoqu-Liu/llmhelper/issues)  \nEncoding UTF-8 RoxygenNote 7.3.3 Depends R (>= 4.1.0)  \nImports cli, dplyr, glue, httr, httr2, jsonlite, purrr, stringr, tibble, tidyprompt  \nSuggests testthat (>= 3.0.0) Config/testthat/edition 3 NeedsCompilation no  \nAuthor Zaoqu Liu [aut, cre](ORCID:  \n\u003C[https://orcid.org/0000-0002-0452-742X](https://orcid.org/0000-0002-0452-742X)>) Maintainer Zaoqu Liu \u003C[liuzaoqu@163.com](liuzaoqu@163.com)> Repository [https://cran.r-universe.dev](https://cran.r-universe.dev)[ ](https://cran.r-universe.dev)[Date/Publication](Date/Publication 2026-01-31 18:50:07 UTC)[ 2026-01-31 18:50:07 UTC](Date/Publication 2026-01-31 18:50:07 UTC)[ ](Date/Publication 2026-01-31 18:50:07 UTC)RemoteUrl [https://github.com/cran/llmhelper](https://github.com/cran/llmhelper)  \nRemoteRef HEAD  \nRemoteSha 7d1c2d1ad9dad9e74f09fdb09ade121e44c98580  \nContents  \nbuild_prompt ........................................ 2  \ndiagnose_llm_connection .................................. 3  \nextract_schema_only .................................... 4  \ngenerate_json_schema ................................... 4  \nget_llm_response ...................................... 5  \nget_user_feedback ..................................... 9  \ngrapes-or-or-grapes ..................................... 9  \nllm_ollama ......................................... 10  \nllm_provider ........................................ 11  \nollama_delete_model .................................... 12  \nollama_download_model .................................. 13  \nollama_list_models ..................................... 13  \nset_prompt ......................................... 14  \nIndex 15  \n\n| build_prompt | Build a templated prompt for LLM interaction using glue |\n| --- | --- |\n\nDescription  \nThis function constructs a structured prompt string by injecting user-supplied parameters into a predefined template. It leverages the glue package to replace named placeholders in the template with actual values, enabling dynamic prompt creation for LLM workflows.  \nUsage  \nbuild_prompt(template,   )  \nArguments  \ntemplate A character string containing the prompt template. Placeholders should be  \nwrapped in {} and correspond to names provided in ... .  \n... Named arguments matching placeholders in template. Each name–value pair  \nwill be substituted into the template at runtime.  \nDetails  \nThe build_prompt() function uses glue::glue_data() internally. Placeholders in template (e.g., {filename}, {threshold}) are resolved by passing a named list of parameters via ... . You can include any number of placeholders in the template, as long as the corresponding argument is supplied when calling this function.  \nValue  \nA single character string with all {placeholder} fields in template replaced by the corresponding values from ... .  \ndiagnose_llm_connection 3  \nAuthor(s)  \nZaoqu Liu; Email: [liuzaoqu@163.com](liuzaoqu@163.com)  \nExamples  \n\\#\\# Not run:  \n\\# Define a template with placeholders  \nprompt_template \u003C - \"  \nPerform the following analysis on dataset at ' {filepath} ' :  \n1 . Load data from ' {filepath} '  \n2 . Norm","cbCaildwGeU6iBz8","https://ap.wps.com/l/cbCaildwGeU6iBz8","pdf",107355,15,"English","# build_prompt\n# diagnose_llm_connection\n# extract_schema_only\n# generate_json_schema\n# get_llm_response\n# get_user_feedback\n# llm_ollama\n# llm_provider\n# ollama_delete_model\n# ollama_download_model\n# ollama_list_models\n# set_prompt\n# Index","[{\"question\":\"What does llmhelper’s unified interface provide?\",\"answer\":\"It provides a unified interface for interacting with large language models through multiple providers such as OpenAI and Ollama, including OpenAI-compatible APIs.\"},{\"question\":\"How does the package validate and structure LLM outputs?\",\"answer\":\"It supports structured JSON responses with schema validation and can generate interactive JSON schemas to guide response formatting.\"},{\"question\":\"What tools are available for diagnosing connection issues?\",\"answer\":\"diagnose_llm_connection performs comprehensive diagnostics across connectivity, endpoint access, authentication, and (optionally) tidyprompt compatibility.\"}]","Unified Interface for Large Language Model Interactions - Version 1.0.0 | PDF",38,[146,150],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/faca975ec7ff3c1b646b69b358337e93.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/2b6cd66889e8ec16decaa4b58cab6fe0.webp",982,1270,{"list":155,"token":66},[156,162,169,175,181,188,194,200,206,213],{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":24,"category_name":30,"create_tm":161},686335,"PolyULib DS Guide - Ollama Local LLM","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000731483/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=7k6YYKjB5k7U0rBqTypfFL99Pq0%3D","polyulib-ds-guide-ollama-local-llm",1794037342,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":167,"category_name":30,"create_tm":168},686342,"Ollama + WebUI Frameworks - How to implement Generative AI Models - Implementation Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999818329/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=o53XvsU%2F3gPoWS8P0HOuohFAvwo%3D","ollama-webui-frameworks-how-to-implement-generative-ai-models-implementation-guide",11,1794037354,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":8,"category_name":30,"create_tm":174},759798,"Node.js Notes for Professionals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044485017/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=k023UV76uWmfZ%2FzVr5TX42BcGwM%3D","nodejs-notes-for-professionals",1795895079,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":24,"category_name":30,"create_tm":180},690668,"Ruckus Networks SmartZone - Data Sheet - Scalable Network Controllers for Converged Wired-Wireless Management","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002036537/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=o14RqostuLulGA97N9Qh7dpDmI8%3D","ruckus-networks-smartzone-data-sheet-scalable-network-controllers-for-converged-wired-wireless-management",1794169325,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":186,"category_name":30,"create_tm":187},83796,"Using OAI Overlay to Enhance REST API Fuzzing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809097024/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=ErtmfbbC8aIizFc7pChrkg8ZIrw%3D","using-oai-overlay-to-enhance-rest-api-fuzzing",26,1784190468,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":56,"category_name":30,"create_tm":193},119242,"Hyperbox-brain - A Python toolbox for hyperbox-based machine learning algorithms - open-source library description","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835115554/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=p5G%2FJKiowMqg5qUXifQGYFj5QQk%3D","hyperbox-brain-a-python-toolbox-for-hyperbox-based-machine-learning-algorithms-open-source-library-description",1785723270,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":81,"category_name":30,"create_tm":199},687746,"SoftProof Manual - Installation - Usage Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000650477/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=dGrQAeJwQjYK9kkmVO9bxxMI3Wk%3D","softproof-manual-installation-usage-guide",1794084872,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":29,"category_name":30,"create_tm":205},678105,"Generating database schema from requirement specification based on natural language processing and large language model","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229994799695/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=3KGQrDsnSilqXqn0Nvk8g%2BbEi7w%3D","generating-database-schema-from-requirement-specification-based-on-natural-language-processing-and-large-language-model",1793784439,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":211,"category_name":30,"create_tm":212},84544,"A Text-Steerable Instrument for Sketching Procedural Soundscapes via Language Models","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809058834/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=bPEsz4oJtO6%2Bm77wYKJfLA%2FyjGo%3D","a-text-steerable-instrument-for-sketching-procedural-soundscapes-via-language-models",25,1784196567,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":52,"category_name":30,"create_tm":218},654933,"ZODIAC BRAIN BOX - Installation Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975069701/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110379&Signature=OWp1RBNsr%2FwLECXLbnCvSJKEQiQ%3D","zodiac-brain-box-installation-guide",1792958519]