Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add Novita AI in README #448

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gptel is a simple Large Language Model chat client for Emacs, with support for m
| DeepSeek | ✓ | [[https://platform.deepseek.com/api_keys][API key]] |
| Cerebras | ✓ | [[https://cloud.cerebras.ai/][API key]] |
| Github Models | ✓ | [[https://github.com/settings/tokens][Token]] |
| Novita AI | ✓ | [[https://novita.ai/model-api/product/llm-api?utm_source=github_gptel&utm_medium=github_readme&utm_campaign=link][Token]] |
#+html: </div>

*General usage*: ([[https://www.youtube.com/watch?v=bsRnh_brggM][YouTube Demo]])
Expand Down Expand Up @@ -79,6 +80,7 @@ gptel uses Curl if available, but falls back to url-retrieve to work without ext
- [[#deepseek][DeepSeek]]
- [[#cerebras][Cerebras]]
- [[#github-models][Github Models]]
- [[#novita-ai][Novita AI]]
- [[#usage][Usage]]
- [[#in-any-buffer][In any buffer:]]
- [[#in-a-dedicated-chat-buffer][In a dedicated chat buffer:]]
Expand Down Expand Up @@ -725,6 +727,46 @@ The above code makes the backend available to select. If you want it to be the
:models '(gpt-4o))
#+end_src

#+html: </details>
#+html: <details><summary>
**** Novita AI
#+html: </summary>

Register a backend with
#+begin_src emacs-lisp
;; Novita AI offers an OpenAI compatible API
(gptel-make-openai "NovitaAI" ;Any name you want
:host "api.novita.ai"
:endpoint "/v3/openai"
:key "your-api-key" ;can be a function that returns the key
:stream t
:models '(;; has many more, check https://novita.ai/llm-api
gryphe/mythomax-l2-13b
meta-llama/llama-3-70b-instruct
meta-llama/llama-3.1-70b-instruct))
#+end_src

You can pick this backend from the menu when using gptel (see [[#usage][Usage]])

***** (Optional) Set as the default gptel backend

The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.
#+begin_src emacs-lisp
;; OPTIONAL configuration
(setq
gptel-model 'gryphe/mythomax-l2-13b
gptel-backend
(gptel-make-openai "NovitaAI"
:host "api.novita.ai"
:endpoint "/v3/openai"
:key "your-api-key"
:stream t
:models '(;; has many more, check https://novita.ai/llm-api
mistralai/Mixtral-8x7B-Instruct-v0.1
meta-llama/llama-3-70b-instruct
meta-llama/llama-3.1-70b-instruct)))
#+end_src

#+html: </details>

** Usage
Expand Down