Saravanan666/pypi-org huggingface dataset:
Package: llist
llist is an extension module for CPython providing basic linked list
data structures.
Collections implemented in the llist module perform well in problems
which rely on fast insertions and/or deletions of elements in
the middle of a sequence.
For this kind of workload, they can be significantly faster than
collections.deque or standard Python lists.This extension requires CPython 2.5 or newer (3.x is supported).
If you are looking for an implementation of linked lists in pure Python,
visithttp://github.com/rgsoda/pypy-llist/The pypy-llist module has the same API as this extension, but is
significantly slower in CPython.Currently llist provides the following types of linked lists:dllist - a doubly linked listsllist - a singly linked listFull documentation of these classes is available at:https://ajakubek.github.io/python-llist/index.htmlTo install this package, either run “pip install llist”,
or download it manually fromhttp://pypi.python.org/pypithen unpack the sources and compile them with “python setup.py install”.The most current development version is available at:https://github.com/ajakubek/python-llist/Bugs can be reported at:https://github.com/ajakubek/python-llist/issuesThis software is distributed under the MIT license.
Please see the LICENSE file included in the package for details.[![Build Status](https://travis-ci.org/ajakubek/python-llist.svg?branch=master)](https://travis-ci.org/ajakubek/python-llist)
Package: lljz-tools
简介包含了一些常用方法的封装，安装方法pip install lljz_tools内含控制台表格常用装饰器彩色日志内置print猴子补丁属性字典更多功能正在开发中...控制台表格目前已有的控制台表格大部分都不支持中文，本表格能完美支持中文（PS：请使用等宽字符，否则效果不完美）frommy_tools.console_tableimportConsoleTable# 数据必须满足list[dict]格式table=ConsoleTable([{"name":"Tom","age":13}])table.show()# print(table)  # 直接打印输出结果2024-02-03 14:37:05.303 - ConsoleTable - "D:\Users\workspace\python_project\my_tools\my_tools\console_table.py:84" - INFO - show : 
   name    |      b    
=======================
    Tom    |      2    
   Lucy    |      4常用装饰器importloggingfrommy_tools.decoratorsimportcatch_exception,time_cache,debug,timer# catch_exception用于自动捕获异常，并支持传入指定logger来记录日志, 支持自动重试@catch_exceptiondeff():raiseValueErrorlogger=logging.getLogger()@catch_exception(logger)# 如果不指定logger，将会自动采用默认logger记录异常堆栈deff1():raiseValueError@catch_exception(retry=3,interval=0.5)# 如果失败，重试3次，每次重试间隔0.5sdeff1():raiseValueError@time_cache(3)# 缓存结果，最多缓存3秒deff1(n):for_inrange(n):pass@debug# 在控制台中将函数运行日志、运行结果、运行耗时等数据自动用logger输出deff1():pass@timer# 自动统计函数运行耗时deff1():pass彩色日志frommy_tools.log_managerimportLogManager# 自动打印彩色日志，自动添加文件handler，日志文件自动按天分割logger=LogManager("your logger name").get_logger()logger.info("info")logger.debug("debug")logger.error("info")print猴子补丁添加猴子补丁之后，print自动变更为日志格式，且会显示print代码所在的行数frommy_tools.monkeyimportpatch_printpatch_print()# 给print添加猴子补丁属性字典属性字典支持用.的格式访问数据frommy_tools.attribute_dictimportAttributeDict,IgnoreCaseAttributeDict# IgnoreCaseAttributeDict支持忽略大小写来访问数据classBook(AttributeDict):name:strauthor:strprice:float=0.1book=Book(name='python',author='guido',price=0.1)assertisinstance(book,dict)print(book.name)# AttributeDict 支持3个额外参数# total: 默认为False，是否全部字段必填，为True时上面定义的三个参数在初始化时都必须指定# variable: 默认为True，是否允许增加字段，为False时无法给字典增加额外的属性字段# check_type：默认为False，是否检查类型，为True则初始化时检查参数是否满足类型要求classUser(AttributeDict,total=True,variable=False,check_type=True):name:strage:intbooks:list[Book]__show__=('name','book')# __show__参数决定在print时展示的字段，默认为全部字段User(name='Tom',age=1,books=[])# OKUser(name='Tom',age='a',books=[])# TypeError, 'a' is not intUser(name='Tom',books=[])# TypeError, missing ageuser=User(name='Tom',age=1,books=[dict(name='python',author='guido',price=0.1)])# OKprint(user)# User(name='Tom', books=[Book(name='python', author='guido', price=0.1)])print(user.name)# Tomuser.sex='male'# TypeError, can not add item
Package: ll-la
ll.laprovides a Python API for the LivingApps system
(seehttp://www.living-apps.de/orhttp://www.living-apps.com/for more info).ll.laallows you to fetch the configured data sources from a template,
create new records, and update and delete existing records all from your Python
prompt (or script).For more info about LivingApps and this Python SDK, seehttps://my.living-apps.de/docs/PythonSDK.html(in german).0.26.0 (2024-02-28)Usernow has an attributeglobalsand supports “member templates”
(i.e. bound templates that can be called and rendered like normal methods).
Package: llm
LLMA CLI utility and Python library for interacting with Large Language Models, both via remote APIs and models that can be installed and run on your own machine.Run prompts from the command-line,store the results in SQLite,generate embeddingsand more.Full documentation:llm.datasette.ioBackground on this project:llm, ttok and strip-tags—CLI tools for working with ChatGPT and other LLMsThe LLM CLI tool now supports self-hosted language models via pluginsAccessing Llama 2 from the command-line with the llm-replicate pluginRun Llama 2 on your own Mac using LLM and HomebrewCatching up on the weird world of LLMsLLM now provides tools for working with embeddingsBuild an image search engine with llm-clip, chat with models with llm chatMany options for running Mistral models in your terminal using LLMInstallationInstall this tool usingpip:pipinstallllmOr usingHomebrew:brewinstallllmDetailed installation instructions.Getting startedIf you have anOpenAI API keyyou can get started using the OpenAI models right away.As an alternative to OpenAI, you caninstall pluginsto access models by other providers, including models that can be installed and run on your own device.Save your OpenAI API key like this:llmkeyssetopenaiThis will prompt you for your key like so:Enter key: <paste here>Now that you've saved a key you can run a prompt like this:llm"Five cute names for a pet penguin"1. Waddles
2. Pebbles
3. Bubbles
4. Flappy
5. ChillyRead theusage instructionsfor more.Installing a model that runs on your own machineLLM pluginscan add support for alternative models, including models that run on your own machine.To download and run Mistral 7B Instruct locally, you can install thellm-gpt4allplugin:llminstallllm-gpt4allThen run this command to see which models it makes available:llmmodelsgpt4all: all-MiniLM-L6-v2-f16 - SBert, 43.76MB download, needs 1GB RAM
gpt4all: orca-mini-3b-gguf2-q4_0 - Mini Orca (Small), 1.84GB download, needs 4GB RAM
gpt4all: mistral-7b-instruct-v0 - Mistral Instruct, 3.83GB download, needs 8GB RAM
...Each model file will be downloaded once the first time you use it. Try Mistral out like this:llm-mmistral-7b-instruct-v0'difference between a pelican and a walrus'You can also start a chat session with the model using thellm chatcommand:llmchat-mmistral-7b-instruct-v0Chatting with mistral-7b-instruct-v0
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
>Using a system promptYou can use the-s/--systemoption to set a system prompt, providing instructions for processing other input to the tool.To describe how the code a file works, try this:catmycode.py|llm-s"Explain this code"HelpFor help, run:llm --helpYou can also use:python -m llm --help
Package: llm2json
⚡LLM2Json⚡是一个易于使用的格式化大语言模型输出工具包，它的主要设计思想和部分实现代码参考Langchain的output parser（但初步输出结果测试优于Langchain）。它可以通过自动构建prompts引导大语言模型输出符合JSON语法的返回数据，解决了大语言模型格式化输出、数据交互、前端开发等遇到的问题，使下游的应用程序开发更加方便快捷。🚀快速开始pip 安装pipinstallllm2json快速上手1. 构造返回数据结构体fromllm2json.prompts.schemaimportBaseModel,FieldclassXiaohongshu(BaseModel):title:str=Field(description="文章标题")context:str=Field(description="正文内容")keywords:list=Field(description="关键词")2.  给定返回数据正确案例（可选项，但建议配置）correct_example='{"title":"文章标题", "context":"正文内容", "keywords":["关键词1","关键词2"]}'3. 生成模板fromllm2json.promptsimportTemplatest=Templates(prompt="""请你为商品：<{topic}>写一篇小红书文案。包括文章标题、正文内容和关键词，同时正文需要包含emoji表情""",field=Xiaohongshu,correct_example=correct_example)mple)template=t.invoke(topic="文心牌润唇膏")4. 格式化返回结果[!NOTE]ernieChat() 是基于文心ErnieBot SDK封装的LLM内容生成函数具体实现可参考：GitHub - PaddlePaddle/ERNIE-SDK: ERNIE Bot Agent is a Large Language Model (LLM) Agent Framework, powered by the advanced capabilities of ERNIE Bot and the platform resources of Baidu AI Studio.fromllm2json.outputimportJSONParserernieResult=ernieChat(template)parser=JSONParser()print(parser.to_dict(ernieResult))5. 生成效果{'title':'文心牌润唇膏，滋润保湿不粘腻！','context':'✨想要拥有水润双唇吗？试试文心牌润唇膏！💦质地轻盈，一抹即化，保湿效果超赞！💋','keywords':['文心牌润唇膏','保湿','轻盈质地','水润双唇']}📚演示案例情感分类classSenta(BaseModel):sentiment:str=Field(description="情感倾向，取值为positive或negative")t=Templates(prompt="""我会给你一段评论，请你判断这段评论是正面还是负面的。评论内容是：{sentiment}""",field=Senta,)template=t.invoke(sentiment="蛋糕味道不错，店家服务也很热情")ernieResult=ernieChat(template)parser=JSONParser()print(parser.to_dict(ernieResult)){'sentiment':'positive'}地址提取classAddress(BaseModel):city:str=Field(description="地级市")t=Templates(prompt="""我会给你一个地址，请你从中提取出地级市名称。地址是：{address}""",field=Address,)template=t.invoke(address="湖北省武汉市汉阳区琴台大道附近")ernieResult=ernieChat(template)parser=JSONParser()print(parser.to_dict(ernieResult)){'city':'武汉市'}生成模拟数据classData(BaseModel):name:str=Field(description="姓名")idcode:str=Field(description="18位数的身份证号")sex:str=Field(description="性别")phone:str=Field(description="手机号")email:str=Field(description="邮箱")address:str=Field(description="居住地址")date:str=Field(description="入职日期")t=Templates(prompt="""请你根据模板生成入职人员测试数据""",field=Data,)template=t.invoke()ernieResult=ernieChat(template)parser=JSONParser()print(parser.to_dict(ernieResult)){'name':'张三','idcode':'123456789012345678','sex':'男','phone':'13800138000','email':'zhangsan@example.com','address':'北京市朝阳区建国门外大街甲8号','date':'2021-11-21'}More examples will be comming soon…
Package: llm2openai
🔥ChatLLM 基于知识库🔥Installpipinstall-UchatllmDocsUsages目前适配的LLMsfromchatllm.applicationsimportChatBaseqa=ChatBase()qa.load_llm(model_name_or_path="THUDM/chatglm-6b")foriinqa(query='周杰伦是谁',knowledge_base='周杰伦是傻子'):print(i,end='')# 根据已知信息无法回答该问题，因为周杰伦是中国内地流行歌手、演员、音乐制作人、导演，# 是具有一定的知名度和专业能力的人物，没有提供足够的信息无法判断他是傻子。OpenaiEcosystemClick to 无缝对接openai生态# 服务端pipinstall"chatllm[openai]"&&chatllm-runopenai<本地模型地址>SDK：pip install openaiimportopenaiopenai.api_base='http://0.0.0.0:8000/v1'openai.api_key='chatllm'prompt="你好"completion=openai.Completion.create(prompt=prompt,stream=True,model="text-davinci-003")forcincompletion:print(c.choices[0].text,end='')# 你好👋!我是人工智能助手 ChatGLM-6B,很高兴见到你，欢迎问我任何问题。客户端：点击下载chatbox，也可接入客户端openai_keys:不定期更新免费keysChatMindClick to ChatMindpipinstall"chatllm"&&chatllm-runwebui--namechatmindChatPDFClick to ChatPDFpipinstall"chatllm[pdf]"&&chatllm-runwebui--namechatpdfpython交互fromchatllm.applications.chatpdfimportChatPDFqa=ChatPDF(encode_model='nghuyong/ernie-3.0-nano-zh')qa.load_llm(model_name_or_path="THUDM/chatglm-6b")qa.create_index('财报.pdf')# 构建知识库foriinqa(query='东北证券主营业务'):print(i,end='')# 根据已知信息，东北证券的主营业务为证券业务。公司作为证券公司，主要从事证券经纪、证券投资咨询、与证券交易、# 证券投资活动有关的财务顾问、证券承销与保荐、证券自营、融资融券、证券投资基金代销和代销金融产品待业务。支持召回结果查看DeployClick to DeployChatGLM-6B 模型硬件需求|量化等级|最低 GPU 显存（推理） |最低 GPU 显存（高效参数微调） |
| -------------- | ------------------------- | --------------------------------- |
| FP16（无量化） | 13 GB                     | 14 GB                             |
| INT8           | 8 GB                     | 9 GB                             |
| INT4           | 6 GB                      | 7 GB                              |从本地加载模型安装指南ChatGLM-6B Mac 本地部署实操记录THUDM/ChatGLM-6B#从本地加载模型TODOClick to TODOChatLLM 应用接入非结构化文档（已支持 md、pdf、docx、txt 文件格式）搜索引擎与本地网页接入结构化数据接入（如 csv、Excel、SQL 等）知识图谱/图数据库接入增加 ANN 后端，ES/RedisSearch【确保生产高可用】增加多级缓存缓存多路召回问标量匹配多种向量化，向量匹配增加相似问，换几个问法高置信度直接返回答案【匹配标准问】答高置信度篇章增加上下文信息增加夸篇章信息增加召回信息的相似信息提前生成标准问，匹配问拒绝推断增加更多 LLM 模型支持THUDM/chatglm-6bTHUDM/chatglm-6b-int8THUDM/chatglm-6b-int4THUDM/chatglm-6b-int4-qeClueAI/ChatYuan-large-v2增加更多 Embedding 模型支持nghuyong/ernie-3.0-nano-zhnghuyong/ernie-3.0-base-zhshibing624/text2vec-base-chineseGanymedeNil/text2vec-large-chinese增加一键启动 webui利用 streamlit 实现 ChatPDF，一键启动chatllm-run webui --name chatpdf利用 gradio 实现 Web UI DEMO添加输出内容及错误提示引用标注增加知识库管理选择知识库开始问答上传文件/文件夹至知识库删除知识库中文件增加 API 支持利用 Fastapi/Flask/Grpc
实现流式接口chatllm-run openai <本地模型地址> --host 127.0.0.1 --port 8000前后端分离，实现调用 API 的 Web UI Demo交流群若二维码失效加微信拉群 313303303
Package: llm4chat
🔥LLM4GPT 为大模型而生🔥Installpipinstall-Ullm4gptDocsUsagesfromllm.qaimportQAfromllm.kbimportFaissANNfromllm.chatllmimportChatLLMfromllm.utilsimportllm_loadfrommeutils.pipeimport*# 解析知识库texts=[]metadatas=[]forpinPath('data').glob('*.txt'):texts.append(p.read_text())metadatas.append({'source':p})# 文档向量化faissann=FaissANN(model_name_or_path="shibing624/text2vec-base-chinese")faissann.add_texts(texts,metadatas)# 构建pipelinemodel,tokenizer=llm_load(model_name_or_path="THUDM/chatglm-6b",device='cpu')glm=ChatLLM()glm.chat_func=partial(model.chat,tokenizer=tokenizer)qa=QA(glm,faiss_ann=faissann.faiss_ann)qa.get_knowledge_based_answer('周杰伦在干吗')qa.get_knowledge_based_answer('姚明住哪里')TODO增加UI增加本地知识库组件增加互联网搜索组件增加知识图谱组件增加微调模块增加流式输出=======
History0.0.0 (2023-04-11)First release on PyPI.
Package: llm4gpt
🔥LLM4GPT 为大模型而生🔥Installpipinstall-Ullm4gptDocsUsagesfromllm.qaimportQAfromllm.kbimportFaissANNfromllm.chatllmimportChatLLMfromllm.utilsimportllm_loadfrommeutils.pipeimport*# 解析知识库texts=[]metadatas=[]forpinPath('data').glob('*.txt'):texts.append(p.read_text())metadatas.append({'source':p})# 文档向量化faissann=FaissANN(model_name_or_path="shibing624/text2vec-base-chinese")faissann.add_texts(texts,metadatas)# 构建pipelinemodel,tokenizer=llm_load(model_name_or_path="THUDM/chatglm-6b",device='cpu')glm=ChatLLM()glm.chat_func=partial(model.chat,tokenizer=tokenizer)qa=QA(glm,faiss_ann=faissann.faiss_ann)qa.get_knowledge_based_answer('周杰伦在干吗')qa.get_knowledge_based_answer('姚明住哪里')TODO增加UI增加本地知识库组件增加互联网搜索组件增加知识图谱组件增加微调模块增加流式输出=======
History0.0.0 (2023-04-11)First release on PyPI.
Package: llm-agent
Installationpipinstallllm-agent==0.3.0Need to assign the OPENAI_API_KEY, if you are trying to use openai apiexportOPENAI_API_KEY=""To assess your own large language model, follow the below instructionsfromllm-agentdefchatbox(*args,**kwargs):## define your chatbox's function and make sure it follow the GPT-3.5-turbo format with 'message', 'temperature' and 'max_tokens' paramenters.llm_agent.run(chatbox,file_path)## the file path refers to the path to store your results
Package: llm-agent-plugin
llm_agentPlugin forllmby the greatsimonwto add a simple langchain agent.FeaturesMultiple search engines: duckduckgo, metaphor, tavily, wikipedia, pubmed, arxiv etc.Browser tool: use playwright to browse the internet autonomously.Math tool: calculator includedBigTask: a tool used to autonomously split a task into subtasksShell: you can opt in to give the llm access to your shell.Files: you can opt in to give the llm access to your files. This is super handy for things like "Modify VAE.py to add docstrings, also add GPU compatibility and add tests."Wallet safe: there is a timeout and recursion limit to avoid too high costs. Also the number of token used so far is displayed.Persistent memory: if you use theuserargument, you can just ask the LLM to memorize something (for example "I want you to memorize that I'm a computer science engineer." or "I want you to memorize that my prefer search engine for people related question is duckduckgo.")Current tools availableagentllm-math (calculator)human (meaning it can decide to ask you for stuff)BigTask (ability to call sub_agent to split the task into many subtasks, each subtask has access to the tools of sub_agent)files (optional, read, write, list, search, move, copy)shell (optional, any command)memorize (optional, if 'user' argument is set this will be used to store information about the user if explicitly asked to remember it)sub_agent (= almost the same as agent but is called to handle subtasks created by BigTask and does not have access to BigTask itself, making infinite recursion using BigTask impossible)llm-mathhumansearch related:browser tools (it can use playwright to navigate the web autonomously)ddg-search (quick answers via duckduckgo, no API required)tavily (optional, a search engine friendly to LLM, API key is required)metaphor (optional, a search engine friendly to LLM, API key is required)wikipedia (quick answers via wikipedia, not the whole article)arxivpubmed (buggy at the moment)files (if enabled)shell (if enabled)Note that if the arugment task_tool is set to False, BigTask tool will not appear and all tools of the sub_agent will be given to the agent instead.Things I used it forUsing the BigTask tool: make it search information about bioaccumulation in salmon and in tuna to compare which is worst.Using the files tool: make it modify a python code to implement various enhancement (worked incredibly well!)How toto install:llm install llm-agent-pluginto run:llm chat -m agentVery early stage, done mostly while procrastinating work. Will improve a lot.TODOfind a way to implement streaming of tokensmany more to come. This is highly experimental and will be substantially improved
Package: llm-agents
LLM AgentsSmall library to build agents which are controlled by large language models (LLMs) which is heavily inspired bylangchain.The goal was to get a better grasp of how such an agent works and understand it all in very few lines of code.Langchain is great, but it already has a few more files and abstraction layers, so I thought it would be nice to build the most important parts of a simple agent from scratch.Some more infos are inthis Hacker News discussion from April 5th 2023and therelated blog post.How it worksThe agent works like this:It gets instructed by a prompt which tells it the basic way to solve a task using toolsTools are custom build components which the agent can useSo far, I've implemented the ability to execute Python code in a REPL, to use the Google search and to search on Hacker NewsThe agent runs in a loop of Thought, Action, Observation, Thought, ...The Thought and Action (with the Action Input to the action) are the parts which are generated by an LLMThe Observation is generated by using a tool (for example the print outputs of Python or the text result of a Google search)The LLM gets the new information appended to the prompt in each loop cycle and thus can act on that informationOnce the agent has enough information it provides the final answerFor more details on how it works, check outthis blog postHow to use itYou can install this libaray locally by running:pip install -e .inside it's directory after cloning it.You also need to provide the following env variables:OPENAI_API_KEYto use the OpenAI API (obtainable at:https://platform.openai.com/account/api-keys)SERPAPI_API_KEYto use the Google Search in case you use that tool (obtainable at:https://serpapi.com/)You can simply export them in bash like:export OPENAI_API_KEY='sh-lsdf....'Then you can run the scriptpython run_agent.pyand ask your question.To construct your own agent do it like this:fromllm_agentsimportAgent,ChatLLM,PythonREPLTool,HackerNewsSearchTool,SerpAPIToolagent=Agent(llm=ChatLLM(),tools=[PythonREPLTool(),SerpAPITool(),HackerNewsSearchTool()])result=agent.run("Your question to the agent")print(f"Final answer is{result}")Of course, you can also build your custom tools or omit tools, for exmaple if you don't want to create a SERPAPI key.
Package: llmanalyst
Language Model AnalystThe Language Model Analyst is a Python package and Streamlit app that enables natural language generation and analysis using HuggingFace-based language models (LLMs) and OpenAI GPT-3. This package and app are designed to simplify and streamline interactions with these powerful language models.UsagePackage: LLMAnalystTheLLMAnalystclass allows you to interact with HuggingFace-based language models. Follow these steps to use the package:Install the package:pipinstallgit+https://github.com/eersnington/LLMAnalyst.git# For using GPTQ modelspipinstallauto-gptq--extra-index-urlhttps://huggingface.github.io/autogptq-index/whl/cu118/Import and create an instance of LLMAnalyst:fromLLMAnalystimportLLMAnalystllm_analyst=LLMAnalyst("TheBloke/CodeLlama-13B-Instruct-GPTQ")query="How many number of rows are there?"df=pd.read_csv("data.csv")result=llm_analyst.conversational_chat(query,df)The OpenAIGPTAnalyst class enables interaction with the OpenAI GPT-3 model. Follow these steps to use the package:Import and create an instance of OpenAIGPTAnalyst:fromLLMAnalystimportOpenAIGPTAnalystopenai_analyst=OpenAIGPTAnalyst(api_key='YOUR_OPENAI_API_KEY')Communicate with GPT-3:query="Calculate the mean of monthly sold data."df=pd.read_csv("data.csv")result=openai_analyst.conversational_chat(query,your_dataframe)
Package: llm-anyscale-endpoints
llm-anyscale-endpointsLLMplugin for models hosted byAnyscale EndpointsInstallationFirst,install the LLM command-line utility.Now install this plugin in the same environment as LLM.llminstallllm-anyscale-endpointsConfigurationYou will need an API key from Anyscale Endpoints. You canobtain one here.You can set that as an environment variable calledLLM_ANYSCALE_ENDPOINTS_KEY, or add it to thellmset of saved keys using:llmkeyssetanyscale-endpointsEnter key: <paste key here>UsageTo list available models, run:llmmodelslistYou should see a list that looks something like this:AnyscaleEndpoints: meta-llama/Llama-2-7b-chat-hf
AnyscaleEndpoints: meta-llama/Llama-2-13b-chat-hf
AnyscaleEndpoints: meta-llama/Llama-2-70b-chat-hf
AnyscaleEndpoints: codellama/CodeLlama-34b-Instruct-hf
AnyscaleEndpoints: mistralai/Mistral-7B-Instruct-v0.1To run a prompt against a model, pass its full model ID to the-moption, like this:llm-mmeta-llama/Llama-2-70b-chat-hf\'Five strident names for a pet walrus'\--system'You love coming up with creative names for pets'You can set a shorter alias for a model using thellm aliasescommand like so:llmaliasessetllama70bmeta-llama/Llama-2-70b-chat-hfNow you can prompt Llama 2 70B using:catllm_anyscale_endpoints.py|\llm-mllama70b-s'explain this code'DevelopmentTo set up this plugin locally, first checkout the code. Then create a new virtual environment:cdllm-anyscale-endpoints
python3-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: llmapi-cli
<p align=”center”><img width=”180” src=”https://avatars.githubusercontent.com/u/127706964?s=200&v=4” alt=”LLMApi Cli”>
<h1 align=”center”>LLMApi Cli</h1>
<p align=”center”>Talk to LLMs like ChatGPT in command line</p></p># Introduction[中文文档](README.zh.md)llmapi_cliis a command-line tool that can directly chat withchatgpt/gpt3and more large language models(LLM), based on thellmapi-serverinterface.
At the same time llmapi_cli also provides Python module (LLMClient).> For more information visit: [llmapi.io](https://llmapi.io)## Install`bash # install from pypi python3-mpip install llmapi_cli ``bash # install locally python3 setup.py install `## Usage`bash # The first time you use this command, # you need to specify parameters, this # will be cached after successful connection. # # If you use your ownllmapi-server:llmapi_cli--host='http://127.0.0.1:5050'--bot=mock# # If you use api.llmapi.io (which is default host): llmapi_cli--bot=mock--apikey='yourapikey on llmapi.io' ``bash # You can directly use this command again: llmapi_cli # # Or change the bot type: llmapi_cli--bot=gpt3# # Or redesignate params like first time. `### Screenshot
![image](imgs/llmapi_cli_demo.png)# Currently supported bot type> View [llmapi-server](https://github.com/llmapi-io/llmapi-server) for more information.Warning: Currently for testing onlychatgpt: openai’s official ChatGPT,[see more](https://openai.com/blog/introducing-chatgpt-and-whisper-apis)gpt3: openai’s official GPT-3welm: Tencent weixin’s llm,[see more](https://welm.weixin.qq.com/docs/introduction/)newbing: microsoft’s new bing chat,UNOFFICIAL INTERFACE