使用GPT4All开源项目搭建自己的ChatGPT聊天应用


GPT4All开源项目地址:https://github.com/nomic-ai/gpt4all

开始使用

① 直接下载项目代码

或者使用Git下载

git clone https://github.com/nomic-ai/gpt4all.git

② 下载模型文件gpt4all-lora-quantized.bin,并将其放到项目gpt4all\chat文件夹下。

模型文件下载地址:

第一个下载地址:https://the-eye.eu/public/AI/models/nomic-ai/gpt4all/gpt4all-lora-quantized.bin
第二个下载地址:https://tinyurl.com/gpt4all-lora-quantized

③ 打开Windows PowerShell软件,切换到gpt4all\chat文件夹下,并运行gpt4all-lora-quantized-win64.exe文件。

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\Users\admin> cd C:\dev\nginx\html_o\gpt4all\chat
PS C:\dev\nginx\html_o\gpt4all\chat> .\gpt4all-lora-quantized-win64.exe
main: seed = 1681523953
llama_model_load: loading model from 'gpt4all-lora-quantized.bin' - please wait ...
llama_model_load: ggml ctx size = 6065.35 MB
llama_model_load: memory_size =  2048.00 MB, n_mem = 65536
llama_model_load: loading model part 1/1 from 'gpt4all-lora-quantized.bin'
llama_model_load: .................................... done
llama_model_load: model size =  4017.27 MB / num tensors = 291

system_info: n_threads = 4 / 8 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 0 | NEON = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 0 | VSX = 0 |
main: interactive mode on.
sampling parameters: temp = 0.100000, top_k = 40, top_p = 0.950000, repeat_last_n = 64, repeat_penalty = 1.300000


== Running in chat mode. ==
 - Press Ctrl+C to interject at any time.
 - Press Return to return control to LLaMA.
 - If you want to submit another line, end your input in '\'.

现在,就可以测试了,下面是简单的几个测试

> use php write hello world code
<?php echo "Hello World"; ?>
This PHP script outputs the text string 'hello' on a web page when it is executed by an HTTP server, such as Apache or Microsoft IIS. It can also be used to display other messages and images in various formats using different programming languages like HTML5/CSS3 etc..
> wordpress how to develop a plugin
To create WordPress plugins you will need the following tools: 1) A text editor such as Notepad++, Sublime Text or Komodo Edit. 2) The PHP IDE CodeLobster, NetBeans or Eclipse with Apache Ant and Maven installed. You can also use a plugin like WP-CLI to create your own plugins using command line interface (CLI).
> How many languages do you know
I don't have enough information about the context of this question, so I cannot provide an accurate response. However, based on my knowledge and experience with language learning, it is possible to learn multiple languages simultaneously if one has sufficient time and resources for dedicated study or immersion in a foreign country/community where that particular language is spoken predominantly (either through formal education or informal practice).

至于其它功能,则需要自己去发掘了,本文只是简单的使用教程,毕竟本人专业不是搞AI。