langchain/docs
Lance Martin 265c285057
Fix GPT4All bug w/ "n_ctx" param (#7093)
Running `GPT4All` per the
[docs](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/gpt4all),
I see:

```
$ from langchain.llms import GPT4All
$ model = GPT4All(model=local_path)
$ model("The capital of France is ", max_tokens=10)
TypeError: generate() got an unexpected keyword argument 'n_ctx'
```

It appears `n_ctx` is [no longer a supported
param](https://docs.gpt4all.io/gpt4all_python.html#gpt4all.gpt4all.GPT4All.generate)
in the GPT4All API from https://github.com/nomic-ai/gpt4all/pull/1090.

It now uses `max_tokens`, so I set this.

And I also set other defaults used in GPT4All client
[here](https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-bindings/python/gpt4all/gpt4all.py).

Confirm it now works:
```
$ from langchain.llms import GPT4All
$ model = GPT4All(model=local_path)
$ model("The capital of France is ", max_tokens=10)
< Model logging > 
"....Paris."
```

---------

Co-authored-by: R. Lance Martin <rlm@Rs-MacBook-Pro.local>
2023-07-04 08:53:52 -07:00
..
api_reference Page per class-style api reference (#6560) 2023-06-30 09:23:32 -07:00
docs_skeleton docs: New experimental UI for Mendable Search (#6558) 2023-07-03 20:52:13 +01:00
extras Fix GPT4All bug w/ "n_ctx" param (#7093) 2023-07-04 08:53:52 -07:00
snippets Update get_started.mdx (#7005) 2023-07-03 02:23:12 -06:00
.local_build.sh Harrison/deeplake new features (#6263) 2023-06-16 17:53:55 -07:00
package-lock.json docs: New experimental UI for Mendable Search (#6558) 2023-07-03 20:52:13 +01:00
requirements.txt Page per class-style api reference (#6560) 2023-06-30 09:23:32 -07:00