langchain/docs/extras/modules/model_io/models/llms/integrations
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
..
ai21.ipynb
aleph_alpha.ipynb
amazon_api_gateway_example.ipynb Amazon API Gateway hosted LLM (#6673) 2023-06-23 21:27:25 -07:00
anyscale.ipynb Fixed a link typo /-/route -> /-/routes. and change endpoint format (#6186) 2023-06-19 22:05:54 -07:00
azure_openai_example.ipynb
azureml_endpoint_example.ipynb Add AzureML endpoint LLM wrapper (#6580) 2023-06-22 01:46:01 -07:00
banana.ipynb
baseten.ipynb
beam.ipynb
bedrock.ipynb
cerebriumai_example.ipynb
clarifai.ipynb Clarifai integration (#5954) 2023-06-22 08:00:15 -07:00
cohere.ipynb
ctransformers.ipynb
databricks.ipynb
deepinfra_example.ipynb
forefrontai_example.ipynb
google_vertex_ai_palm.ipynb Be able to use Codey models on Vertex AI (#6354) 2023-06-20 23:11:54 -07:00
gooseai_example.ipynb
gpt4all.ipynb Fix GPT4All bug w/ "n_ctx" param (#7093) 2023-07-04 08:53:52 -07:00
huggingface_hub.ipynb
huggingface_pipelines.ipynb
huggingface_textgen_inference.ipynb
jsonformer_experimental.ipynb
llamacpp.ipynb Add Metal support to llama.cpp doc (#7092) 2023-07-03 13:35:39 -06:00
llm_caching.ipynb docs/fix links (#6498) 2023-06-20 14:06:50 -07:00
manifest.ipynb
modal.ipynb
mosaicml.ipynb
nlpcloud.ipynb
octoai.ipynb move octo notebook (#6901) 2023-06-29 12:20:55 -07:00
openai.ipynb
openllm.ipynb Add OpenLLM wrapper(#6578) 2023-06-22 01:18:14 -07:00
openlm.ipynb
petals_example.ipynb
pipelineai_example.ipynb
predictionguard.ipynb
promptlayer_openai.ipynb
rellm_experimental.ipynb
replicate.ipynb
runhouse.ipynb
sagemaker.ipynb
stochasticai.ipynb
textgen.ipynb docs/fix links (#6498) 2023-06-20 14:06:50 -07:00
writer.ipynb