Saravanan666/pypi-org huggingface dataset:
Package: llm-api-python
LLM API for pythonThis python library connects tollm-apiusing python, it was build to mimicOpenAI's python libraryUsageYou can install this library using pippip install llm-api-pythonAfter runningllm-api, simply configure your client as if it's OpenAI's python bindingimportllm_apillm_api.api_key="<your llm-api api key here>"completion=llm_api.ChatCompletion.create(messages=[{"role":"system","content":"You are a helpful assistant, please answer the users' questions with honesty and accuracy."},{"role":"user","content":"What is the capital of France?"}])# returns a chat completion objectcompletion=llm_api.ChatCompletion.create(messages=[...],stream=True)# returns a generatorcompletion=awaitllm_api.ChatCompletion.acreate(messages=[...])# returns a chat completion objectcompletion=awaitllm_api.ChatCompletion.acreate(messages=[...],stream=True)# returns a async generatorLimitationsrequest_idandrequest_msare currently returned emptycreatedtimestamp is not set by the serverfinish_reasonis hardcoded tostopusagevalues are set toNonethemodelattribute is not being usedCreditOpenAI's python implementation since this implementation is technically a fork of it.
Package: llmask
LLMask [ɛl ɛl 'ma:sk]A command-line tool for masking authorship of text,
by changing the writing style with a Large Language Model.The main use cases of masking an author's writing sytle are:anonymizing who is the author of a textprotecting the identity of whistleblowers and activistssee more atAdversarial StylometryDisclaimer⚠️ This project currently is just a demo of what LLMs can do for authorship anonymization.⚠️ There is no strong evidence yet that this tool can beat state of the art de-anonymization methods!Known LimitationsDespite it's pre-production status, this library has several known limitations:Only a limited number of transformations are implemented (seetransform.py).Long chains of transformations have observed to make the LLM output artifacts.Sensitive content can trigger an LLMs censoring, and thus ruin the output.In this case it is advised to try uncensored LLMs, e.g. of thewizard-vicuna-uncensoredtype.Currently, unique names of places or persons are not removed/anonymized.Example workflowLocally serve a Large Language Model server withollama:$ ollama serveMake sure a potent model is downloaded, e.g. a version ofnous-hermes2:$ ollama pull nous-hermes2:10.7b-solar-q6_KMask your writing style by transforming it into a different one:$ llmask transform -i "this was a triumph. i'm making a note here: huge success."


User-provided input:

> this was a triumph. i'm making a note here: huge success.


Result after applying transformation 'thesaurus':

> This was an astonishing achievement. I'll jot down: extraordinary victory.


Result after applying transformation 'simplify':

> This was a great success. I'll write down: wonderful win.Getting startedSystem requirementsLLMs can run on ordinary CPUs, e.g. withollama.
However, GPU acceleration greatly accelerates execution speed.This project is best tested on Apple Silicon hardware.InstallationThis command line tool can be installed withpipx install.Usage options$ llmask -h

Usage: llmask [OPTIONS]

  Transform input text with chained transformations by a Large Language Model.

Options:
  -t, --transformations TEXT  Compact representation of operations (e.g. 'tsi'
                              for the steps 'thesaurus -> simplify ->
                              imitate')  [default: ts]
  -i, --input TEXT            Input text that will be transformed.  [required]
  -p, --persona TEXT          Name of persona whose writing style to imitate.
                              [default: Ernest Hemingway]
  -m, --model TEXT            Name of model to use (as known to model server).
                              [default: nous-hermes2:10.7b-solar-q6_K]
  -u, --url TEXT              URL of Open AI compatible model API.  [default:
                              http://localhost:11434/v1]
  -h, --help                  Show this message and exit.Development setupInstall development environmentThe development environment can be installed via:poetry install.Run test suiteTo execute this project's test suite, runpytest tests/Roadmapsupport transformations from and into text filesmeasure success of obfuscation (e.g. check with GPTZero if suspected author is an LLM)
Package: llm-autodocs
llm-autodocs 🪄Overview 🌞autodocsis a Python-based command-line tool for automatically generating documentation for git-tracked Python files in a project. It leverages LLMs to generate documentation automatically and asynchronously.Features ⚡️Git Integration: Only selects Python files that are tracked by Git within a specified directory.Custom File Selection: Offers the flexibility to specify files to include or exclude in the documentation process.LLM Support: Currently supports OpenAI gpt modelsAsynchronous Execution: Improves performance by handling multiple files concurrently.Quickstart 🚴‍♂️Install the library:pipinstallllm-autodocsNavigave to your git project and run:cdmy_project/
autodocs--directory.This will run in the root of your project and include all tracked .py files. By default it usesgpt-3.5-turbo.You will be prompted to review the files affected before continuing.ExamplesSpecify a specific directory:autodocs --directory ./srcSpecify a different openai model (can be any of the gpt-3.5* or gpt-4* patterns):autodocs --documenter gpt-4Allow only certain file patterns:autodocs --allowed-files utils.py data_model.pyExclude certain file patterns:autodocs --ignored-files __init__.py
Package: llmbda-fastapi
Relevance AI - The platform building and deploying AI chains and Agents🔥 Use Relevance to unlock the value of LLMs:⚡ Quickly build and deploy chains in a few lines of code with fully managed deployment.🔎 Drilldown with filters and similarity search to explore and find insights.🔑 Vectors, storing and querying vectors with flexible vector similarity search, that can be combined with multiple vectors, aggregates and filters.🚀 Share chains as data apps with your team.Sign up for a free account ->🧠 DocumentationTypeLinkPython SDKDocumentationDashboardDocumentationJavascript SDKDocumentation
Package: llm-bedrock-anthropic
llm-bedrock-anthropicPlugin forLLMadding support for Anthropic's Claude models.InstallationInstall this plugin in the same environment as LLM. From the current directoryllminstallllm-bedrock-anthropicConfigurationYou will need to specify AWS Configuration with the normal boto3 and environment variables.For example, to use the regionus-west-2and AWS credentials under thepersonalprofile, set the environment variablesexportAWS_DEFAULT_REGION=us-west-2exportAWS_PROFILE=personalUsageThis plugin adds models calledbedrock-claudeandbedrock-claude-instant.You can query them like this:llm-mbedrock-claude-instant"Ten great names for a new space station"llm-mbedrock-claude"Compare and contrast the leadership styles of Abraham Lincoln and Boris Johnson."Optionsmax_tokens_to_sample, default 8_191: The maximum number of tokens to generate before stoppingUse like this:llm-mbedrock-claude-omax_tokens_to_sample20"Sing me the alphabet"Hereisthealphabetsong:

ABCDEFG
HIJ
Package: llm-bedrock-meta
llm-bedrock-metaPlugin forLLMadding support for Meta LLama 2's  models in Amazon BedrockInstallationInstall this plugin in the same environment as LLM. From the current directoryllminstallllm-bedrock-metaConfigurationYou will need to specify AWS Configuration with the normal boto3 and environment variables.For example, to use the regionus-west-2and AWS credentials under thepersonalprofile, set the environment variablesexportAWS_DEFAULT_REGION=us-west-2exportAWS_PROFILE=personalUsageThis plugin adds model calledbedrock-llama2-13b. You can also use it with the aliasbl2.You can query them like this:llm-mbedrock-llama2-13b"Ten great names for a new space station"llm-mbl2"Ten great names for a new space station"You can also chat with the model:llmchat-mbl2Options-o max_gen_len 1024, default 2_048: The maximum number of tokens to generate before stopping.-o verbose 1, default 0: Output more verbose logging.-o temperature 0.8, default 0.6: Use a lower value to decrease randomness in the response.top_p, default 0.9: Use a lower value to ignore less probable options. Set to 0 or 1.0 to disable.Use like this:llm-mbedrock-llama2-13b-omax_gen_len20"Sing me the alphabet"Hereisthealphabetsong:

ABCDEFG
HIJ
Package: llm-blocks
LLM Blocks 🤖LLM Blocks is a Python library that provides a flexible and easy-to-use interface for interacting with OpenAI's GPT models. It provides a set of classes and methods to handle different types of interactions with the model, such as chat, template, and streamed responses.📚 Table of ContentsWhy Use LLM BlocksRepo StructureInstallationUsageTestingContributing🚀 Why Use LLM BlocksLLM Blocks simplifies the process of interacting with OpenAI's GPT models. It provides a set of classes and methods that abstract away the complexity of the underlying API calls, allowing you to focus on what matters most - building your application. Whether you're building a chatbot, a code generator, or any other application that leverages AI, LLM Blocks can help you get there faster.📂 Repo Structurellm_blocks
├── blocks.py
├── block_factory.py
├── __init__.py
├── requirements.dev.txt
tests
└── test_blocks.py💻 InstallationTo install LLM Blocks, you can use pip:pipinstallllm_blocks🎯 UsageHere's a simple example of how to use LLM Blocks:fromllm_blocksimportblock_factory# Create a blockblock=block_factory.get('block')# Execute the block with some contentresponse=block.execute("Hello, world!")# or execute like a functionresponse=block("Hello, world!")# Print the responseprint(response)🧪 TestingTo run the tests, navigate to the root directory of the project and run:python-munittestdiscovertests🤝 ContributingContributions are welcome! Please read ourcontributing guidelinesto get started.📝 LicenseThis project is licensed under the terms of the MIT license. See theLICENSEfile for details.📧 ContactIf you have any questions, feel free to reach out to us atcontact@llmblocks.com.
Package: llmbot_plugin_bilisearch
llmbot-plugin-bilisearch适用于OpenaiBot的函数插件，可以通过自然语言调用哔哩哔哩搜索功能。📦 Installpipinstallllmbot_plugin_bilisearch-Uhttps://github.com/LlmKira/llmbot_plugin_bilisearch/blob/main/llmbot_plugin_bilisearch/__init__.py#L2-L8📝 Hookhttps://github.com/LlmKira/llmbot_plugin_bilisearch/blob/cbe0e4b20320b8789a5dad44eefef3c0c8233484/llmbot_plugin_bilisearch/__init__.py#L63-L71
Package: llmbot_plugin_reecho_voice
llmbot_plugin_reecho_voice适用于OpenaiBot的函数插件，可以提供中文语音合成功能。📦 Installpipinstallllmbot_plugin_reecho_voice-U📄 Usage/env REECHO_MODEL=xxx;REECHO_KEY=xxx;REECHO_VOICE_ID=xxx模型 ID 可以在ReEcho的控制台中找到。注意需要完整的模型
ID，例如9ede7186-f24b-4018-a907-c3927c5e596a。公共 API Key可以额外配置PLUGIN_REECHO_KEY来指定默认公共 API Key。默认参数如下voice_id="4a632551-65d5-427e-b617-b2696c34587d"model="reecho-neural-voice-001"也就是晓蕾https://dash.reecho.ai/voice/4a632551-65d5-427e-b617-b2696c34587d📝 HookclassReechoSpeak(BaseTool):"""语音工具"""silent:bool=Falsefunction:Function=speak_chinesekeywords:list=["语音","说","读","念","回答","骂","唱","朗读","朗诵"]require_auth:bool=Falserepeatable:bool=Falseenv_required:list=["KEY","VOICE_ID","MODEL"]env_prefix:str="REECHO_"
Package: llmbot_plugin_sticker
llmbot-plugin-sticker适用于OpenaiBot的函数插件，贴纸。📦 Installpipinstallllmbot_plugin_sticker-U📝 美术资源许可注意1.0.* 版本的美术资源仅供测试使用，不可用于商业用途。版权归原作者所有。📝 Hookhttps://github.com/LlmKira/llmbot_plugin_sticker/blob/a699c2c726ae8c8a2e1e5acbdfb671a7e37966ba/llmbot_plugin_sticker/__init__.py#L74-L99
Package: llmbox
LLM BoxLLMs at your serviceIndex 📒MissionApplicationsCreditsLicenseMission 🚀Large Language Models (LLMs) have taken the world by storm with its endless capabilities and applications.But we are still in the early days.LLM Box is a collection of UI-based applications built using open source and/or enterprise LLMs as solutions for simple, fun or complex use cases.Why code when you don't have to? But ok, there is a Python package too.Applications 🖥️PlaygroundAppDescriptionClaude BoxChat with the Claude family of LLMs by AnthropicCredits 🙏LogoGenerated usingMidjourneywith the prompt:Minimalistic vector logo made of lines featuring a fancy box, using simple shapes and lines in a blocky, modern, and artistic style with a color scheme of five colorsLLMsPowered by the creators of various LLMs who generously provide access:Claude by AnthropicGPT by OpenAILicense 📋This project is licensed under theApache License 2.0.
Package: llm-caiche
Caiche: Unified Language Model CacheWelcome toCaiche– your gateway to efficient and cached language model interactions! 🚀What is Caiche?Caiche is a Unified Language Model Cache designed to streamline your language model queries. Imagine a world where you can ask a question and instantly get a response, thanks to a global vector database that stores and retrieves prompt-response pairs. That's Caiche for you – making your language model interactions faster and cheaper.InstallationInstalling Caiche is a breeze. Open your terminal and run:pipinstallllm-caicheGetting StartedNow that you have Caiche installed, let's dive into some quick code snippets to get you started:fromcaicheimportCaiche# Replace <OPENAI_API_KEY> with your actual OpenAI API keycai=Caiche(api_key="<OPENAI_API_KEY>")# Ask a question and get a responseresult=cai.query("What is the capital of Bulgaria?")And just like that, you're ready to unlock the power of cached language model responses!Why Caiche?1.Cheaper ResponsesEnjoy cost savings as you won't be charged for inference costs when a response is cached.2.Faster QueriesCaiche eliminates the need to wait for language models to generate responses by storing and retrieving previous interactions. Say goodbye to unnecessary delays!3.Global DatabaseYour prompts and responses are stored globally, allowing you to benefit from a vast database of interactions. Join the Caiche community and contribute to a shared knowledge space.What's Next?At Caiche, we're not just stopping at efficient cached responses. Our vision extends beyond, aiming to redefine the landscape of language model interactions. Here's a glimpse of what's on the horizon:Approximate Cache for Semantically Similar PromptsWe're actively working on building an approximate cache that goes beyond storing exact prompt-response pairs. Our goal is to leverage the collected data to lower costs not only for existing prompts but also for prompts that are semantically similar. Imagine getting cost-efficient responses for a range of related queries, making your interactions even more budget-friendly and responsive.Community and ContributionsWe believe in the power of community collaboration. If you have ideas, improvements, or want to report issues, head over to ourGitHub repositoryand let your voice be heard!Example Use CasesConversational AgentsEnhance the user experience of your chatbots and conversational agents by tapping into the Caiche global database.Research and DevelopmentExpedite your language model experimentation process by utilizing stored interactions for quicker testing.ContributingWe will be adding contributing guidelines soon.LicenseCaiche is licensed under theMIT License. Feel free to explore, modify, and share!Ready to revolutionize your language model interactions? Install Caiche, explore the possibilities, and join us on this exciting journey!Happy querying! 🚀✨
Package: llmchatbot
LLM-ChatbotInstallationTo get the Chatbot Python package by the following commands:PyPypipinstallllmchatbotGitHub repositorypipinstallgit+https://github.com/egpivo/llmchatbot.gitServing AutomationThis repository automates the process of checking and fine-tuning pre-trained models for the Chatbot application. The automation script allows you to customize SpeechT5 and SWhisper models and enables retraining if needed.Serving Process Flowgraph TD
  A[Check if Model Exists]
  B[Fine-Tune Model]
  C[Load BentoML Configuration]
  D[Serve the App]
  E[Check SSL Certificates]
  F[Generate Dummy SSL Certificates]

  A -- Yes --> C
  A -- No --> B
  B --> C
  C --> D
  D --> E
  E -- No --> F
  E -- Yes --> DArtifact FolderDuring the model serving process, theartifactsfolder is used to store the BentoML artifacts, essential for serving the Chatbot application.UsageLocal Model ServingDefault Model ValuesRun the Chatbot service with default model values:makelocal-serveCustomizing the Serving ProcessCustomize the Chatbot serving process using the automation script. Specify your desired models and options:bashscripts/run_app_service.sh\--t5_pretrained_model{replace_with_actual_t5_model}\--t5_pretrained_vocoder{replace_with_actual_t5_vocoder}\--whisper_pretrained_model{replace_with_actual_whisper_model}\--is_retrainingNote: Replace{replace_with_actual_t5_model},{replace_with_actual_t5_vocoder}, and{replace_with_actual_whisper_model}with your preferred values. Adding the--is_retrainingflag forces model retraining.Model Serving via DockerBy Makefile:makedocker-serveBydockerCLIDockerHubdockerrun-p443:443egpivo/chatbot:latestGitHub Packagedockerrun-p443:443ghcr.io/egpivo/llmchatbot:latestClient SideAccess the demo chatbot athttps://{ip}/chatbot, with the default values being0.0.0.0for theip.Note: Dummy SSL certificates and keys are created by default for secure communication ifkey.pemandcert.pemdo not exit inartifacts/. Or you can replace them manually.DemoExplore the demo site hosted on Alibaba Cloud viahttps://egpivo.com/chatbot/.Note: This site is intended for demo purposes only, and there is no guarantee of computing efficiency.RemarkReference:BentoChain RepositoryLicense:BSD 2-Clause License
Package: llm-claude
llm-claudePlugin forLLMadding support for Anthropic's Claude models.InstallationInstall this plugin in the same environment as LLM.llminstallllm-claudeConfigurationYou will need an API key from Anthropic. Request access athttps://www.anthropic.com/earlyaccessthen go tohttps://console.anthropic.com/account/keysYou can set that as an environment variable calledANTHROPIC_API_KEY, or add it to thellmset of saved keys using:llmkeyssetclaudeEnter key: <paste key here>UsageThis plugin adds models calledclaudeandclaude-instant.Anthropicdescribes them as:two families of models, both of which support 100,000 token context windows:Claude Instant: low-latency, high throughputClaude: superior performance on tasks that require complex reasoningYou can query them like this:llm-mclaude-instant"Ten great names for a new space station"llm-mclaude"Compare and contrast the leadership styles of Abraham Lincoln and Boris Johnson."Optionsmax_tokens_to_sample, default 10_000: The maximum number of tokens to generate before stoppingUse like this:llm-mclaude-omax_tokens_to_sample20"Sing me the alphabet"Hereisthealphabetsong:

ABCDEFG
HIJDevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cd llm-claude
python3 -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest
Package: llm-clip
llm-clipLLMplugin for embedding images and text usingCLIPInstallationInstall this plugin in the same environment as LLM.llminstallllm-clipUsageOnce you have installed an embedding model you can use it to embed text like this:llmembed-mclip-c'Hello world'Or an image like this:llmembed-mclip--binary-iIMG_4801.jpegEmbeddings are more useful if you store them in a database - seethe LLM documentationfor details.To embed every photograph in a folder and save them in a collection called "photos":llmembed-multiphotos-mclip--binary--filesphotos/'*.jpg'You can then search for photos of specific things like this:llmsimilarphotos-c'bunny'DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cdllm-clip
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: llm-cluster
llm-clusterLLMplugin for clustering embeddings.InstallationInstall this plugin in the same environment as LLM.llminstallllm-clusterUsageThe plugin adds a new command,llm cluster. This command takes the name of anembedding collectionand the number of clusters to return.First, usepaginate-jsonandjqto populate a collection. I this case we are embedding the title and body of every issue in thellm repository, and storing the result in aissues.dbdatabase:paginate-json'https://api.github.com/repos/simonw/llm/issues?state=all&filter=all'\|jq'[.[] | {id: .id, title: .title}]'\|llmembed-multillm-issues-\--databaseissues.db--storeThe--storeflag causes the content to be stored in the database along with the embedding vectors.Now we can cluster those embeddings into 10 groups:llmclusterllm-issues10\-dissues.dbIf you omit the-doption the default embeddings database will be used.The output should look something like this (truncated):[{"id":"2","items":[{"id":"1650662628","content":"Initial design"},{"id":"1650682379","content":"Log prompts and responses to SQLite"}]},{"id":"4","items":[{"id":"1650760699","content":"llm web command - launches a web server"},{"id":"1759659476","content":"`llm models` command"},{"id":"1784156919","content":"`llm.get_model(alias)` helper"}]},{"id":"7","items":[{"id":"1650765575","content":"--code mode for outputting code"},{"id":"1659086298","content":"Accept PROMPT from --stdin"},{"id":"1714651657","content":"Accept input from standard in"}]}]The content displayed is truncated to 100 characters. Pass--truncate 0to disable truncation, or--truncate Xto truncate to X characters.Generating summaries for each clusterThe--summaryflag will cause the plugin to generate a summary for each cluster, by passing the content of the items (truncated according to the--truncateoption) through a prompt to a Large Language Model.This feature is still experimental. You should experiment with custom prompts to improve the quality of your summaries.Since this can run a large amount of text through a LLM this can be expensive, depending on which model you are using.This feature only works for embeddings that have had their associated content stored in the database using the--storeflag.You can use it like this:llmclusterllm-issues10\-dissues.db\--summaryThis uses the default prompt and the default model.To use a different model, e.g. GPT-4, pass the--modeloption:llmclusterllm-issues10\-dissues.db\--summary\--modelgpt-4The default prompt used is:Short, concise title for this cluster of related documents.To use a custom prompt, pass--prompt:llmclusterllm-issues10\-dissues.db\--summary\--modelgpt-4\--prompt'Summarize this in a short line in the style of a bored, angry panda'A"summary"key will be added to each cluster, containing the generated summary.DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cdllm-cluster
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: llm-cohere
llm-coherePlugin forLLMadding support forCohere's Generater and Summarize models.InstallationInstall this plugin in the same environment as LLM.llminstallllm-cohereConfigurationYou will need an API key from Cohere. You can obtain one by creating an account and going to 'API Keys'.You can set that as an environment variable calledCOHERE_API_KEY, or add it to thellmset of saved keys using:llmkeyssetcohereEnter key: <paste key here>UsageThis plugin adds two models.cohere-generateuses an input prompt and generates output based on it.summarizetakes an input prompt and generates a summarised response.llm-mcohere-generate"Seven great names for a pet lemur"Cohere also supports system prompts, which are sent to Cohere in the format of<prompt>: <system prompt>.echo"I like lemurs a lot"|llm-mcohere-generate--system"Translate to german"DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cdllm-cohere
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'