Package: pxgpt
Your personal, powerful and private GPTFeaturesIngest of your own documents and talk to them.Store your data locally on your device.Choose from a variety of models, including OpenAI.Support conversation history and memory.Switch between profiles with different settings.Support both web interface and command line interface.Support Llama v2!Installation# With all supported models$pipinstall-Upxgpt[all]# With support for GPT4all only$pipinstall-Upxgpt[gpt4all]# With support for llama-cpp only$pipinstall-Upxgpt[llama-cpp]# With support for openai only$pipinstall-Upxgpt[openai]Then copy the configuration from.pxgpt.config-example.ymlto.pxgpt.config.ymland modify it to your needs.UsageChat from CLI$23:45:06❯pxgptchat

WelcometochatviathepxGPTCLIv0.0.0rc0!
Hit'Ctrl+c'or'Ctrl+d'toexit.[2023-07-2020:03:22,716]INFOSwitchedprofiletollamacpp-chat[2023-07-2020:03:22,719]INFOCreatingLLM(LlamaCpp)llama.cpp:loadingmodelfrommodels/llamacpp/llama-2-7b.ggmlv3.q4_0.bin
llama_model_load_internal:format=ggjtv3(latest)llama_model_load_internal:n_vocab=32000llama_model_load_internal:n_ctx=512llama_model_load_internal:n_embd=4096llama_model_load_internal:n_mult=256llama_model_load_internal:n_head=32llama_model_load_internal:n_layer=32llama_model_load_internal:n_rot=128llama_model_load_internal:freq_base=10000.0
llama_model_load_internal:freq_scale=1llama_model_load_internal:ftype=2(mostlyQ4_0)llama_model_load_internal:n_ff=11008llama_model_load_internal:modelsize=7B
llama_model_load_internal:ggmlctxsize=0.08MB
llama_model_load_internal:memrequired=5185.72MB(+1026.00MBperstate)llama_new_context_with_model:kvselfsize=256.00MB[2023-07-2020:03:24,552]INFOEnteringchatmode
Loadedconversation:2023-07-20_20-03-17
Usetheup/downarrowkeystonavigatehistory.
Use/helptoseethelistofcommands.

>>>HelloLlama2,ifyoucouldchooseasuperpower,whatwoulditbeandwhy?Iwillanswerthisquestionintwoparts.ThefirstpartisthesuperpowerthatIwillchoose.ThesecondpartiswhyIchosethissuperpower.
Inthefirstpart,thesuperpowerthatIwillchooseistheabilitytofly.Thisisbecauseflyinghasmanybenefits.Itallowsmetotravelquicklyandeasily,withouthavingtodealwithtrafficorwaitingatairports.Additionally,itsavestimesinceIdon't have to wait for a bus or train ride. Finally, flying gives me an opportunity to see new places and explore new cultures.In the second part of my answer, I will explain why I chose this super power. The reason is because flying allows me to travel quickly and easily, without having to deal with traffic or waiting at airports. Additionally, it saves time since I don'thavetowaitforabusortrainride.Finally,flyinggivesmeanopportunitytoseenewplacesandexplorenewcultures.

>>>/help
Commands:-/help:Listthecommands-/new:Startanewconversation-/switch:Switchtoaconversation-/list:Listallconversations-/path:Showthepathofthecurrentconversationfile-/delete:Deleteaconversation-/rename:Renameaconversation-/ingest:Ingestdocumentsfromthesourcedirectory-/docs:Listingestedanduningesteddocumentsinthesourcedirectory-/exit:ExittheCLI

>>>Chat from the web interface$pxgptserve# Open http://localhost:7758 in your browserConfigurationpx
The configuration files are loaded from the following paths:~/.config/pxgpt/config.yml~/.pxgpt.config.yml./.pxgpt.config.ymlProfilesNote that you need to define profiles in the configuration file. For example:openai:# The profilemodel:type:ChatOpenAIThe configuration items are inherited from thedefaultprofile. For example:default:credentials:openai_api_key:sk-xxxxxxxxxxxopenai:model:type:ChatOpenAIThen when you useopenaiprofile, the configurations are expanded as:openai:credentials:openai_api_key:sk-xxxxxxxxxxxmodel:type:ChatOpenAIHigher-level configurations override lower-level configurations. For example:If you define thedefaultprofile in~/.config/pxgpt/config.ymland theopenaiprofile in./.pxgpt.config.yml, then theopenaiprofile will inherit thedefaultprofile, as well.Configuration itemslog_level: The log level for the logger in your teminalhistory_directory: The directory to store the conversation historyhistory_into_memory: Whether to load the conversation history into memoryYou can turn this off if you are using small modelscredentials: The credentials for the models.
For example, for OpenAI, you need to provide theopenai_api_key.model: Type of the model and arguments for it.type: The type of the model, supported models are:GPT4All,LlamaCpp,ChatOpenAIandOpenAI<other>: The arguments for the model. Passed tolangchainllms.ForGPT4All, you can pass the arguments listed inhere.ForLlamaCpp, you can pass the arguments listed inhere.ForChatOpenAI, you can pass the arguments listed inhere.ForOpenAI, you can pass the arguments listed inhere.qmodel: The arguments for model used to condense questionstype: Same asmodel.type, with andEchomodel added, which is useful for models that don't do question condensing very well.<other>: Same asmodel.<other>.ingest: The arguments for the ingestion.source_directory: The directory to ingest documents from.If not provided, we will enter the chat mode.persist_directory: The directory to save the vectorstore database.If not provided, will use<source_directory>/.pxgpt-<model>-db.target_source_chunks: The number of chunks to return against the query.n_workers: The number of workers to use for ingestion.chunk_sizeandchunk_overlap: The chunk size and overlap for the ingestion.embeddings: The arguments for the embeddings.ForGPT4All, you can pass the arguments listed inhere.ForLlamaCpp, you can pass the arguments listed inhere.ForOpenAIorChatOpenAI, you can pass the arguments listed inhere.Ingest documents$pxgptingest# default profile$pxgptingest--profileopenai-docs# Will ingest documents under `ingest.source_directory` under `openai-docs` profileCreditspxgptis Inspired byprivateGPT, with the addition of openai API support, history and memory support, and a web interface.TODOSupport ingestion management (upload/download/delete/ingest documents) from the web interfaceSupport profile management (add/remove/modify) from the web interfaceUse markdown to format the response on the web interfaceRead credentials from environment variablesBuild a docker imageSupport more modelsQ & AQA.md