diff --git a/README.org b/README.org index 77259ef..7940af9 100644 --- a/README.org +++ b/README.org @@ -169,12 +169,11 @@ You can pick this backend from the transient menu when using gptel (see usage), Register a backend with #+begin_src emacs-lisp -(defvar gptel--ollama - (gptel-make-ollama - "Ollama" ;Any name of your choosing - :host "localhost:11434" ;Where it's running - :models '("mistral:latest") ;Installed models - :stream t)) ;Stream responses +(gptel-make-ollama + "Ollama" ;Any name of your choosing + :host "localhost:11434" ;Where it's running + :models '("mistral:latest") ;Installed models + :stream t) ;Stream responses #+end_src These are the required parameters, refer to the documentation of =gptel-make-gpt4all= for more. diff --git a/gptel-ollama.el b/gptel-ollama.el index 2d81347..f5e5fd1 100644 --- a/gptel-ollama.el +++ b/gptel-ollama.el @@ -113,7 +113,16 @@ alist, like: KEY (optional) is a variable whose value is the API key, or function that returns the key. This is typically not required for -local models like Ollama." +local models like Ollama. + +Example: +------- + +(gptel-make-ollama + \"Ollama\" + :host \"localhost:11434\" + :models '(\"mistral:latest\") + :stream t)" (let ((backend (gptel--make-ollama :name name :host host diff --git a/gptel-openai.el b/gptel-openai.el index 316efc4..b8bcd42 100644 --- a/gptel-openai.el +++ b/gptel-openai.el @@ -166,7 +166,18 @@ alist, like: ((\"Content-Type\" . \"application/json\")) KEY (optional) is a variable whose value is the API key, or -function that returns the key." +function that returns the key. + +Example: +------- + +(gptel-make-azure + \"Azure-1\" + :protocol \"https\" + :host \"YOUR_RESOURCE_NAME.openai.azure.com\" + :endpoint \"/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2023-05-15\" + :stream t + :models '(\"gpt-3.5-turbo\" \"gpt-4\"))" (let ((backend (gptel--make-openai :name name :host host @@ -210,7 +221,16 @@ alist, like: KEY (optional) is a variable whose value is the API key, or function that returns the key. This is typically not required for -local models like GPT4All.") +local models like GPT4All. + +Example: +------- + +(gptel-make-gpt4all + \"GPT4All\" + :protocol \"http\" + :host \"localhost:4891\" + :models '(\"mistral-7b-openorca.Q4_0.gguf\"))") (provide 'gptel-openai) ;;; gptel-backends.el ends here