mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-17 11:07:11 +08:00
refactor(web): drop hardcoded preset models for custom providers & fix handler bug
- Remove vendor-specific preset model lists for custom embedding/vision providers; users now type the model id manually (lists vary per vendor). - Strip third-party vendor names from comments. - Fix AttributeError in _set_vision/_set_embedding: the provider constants live on ModelsHandler, not ConfigHandler, so selecting a built-in provider crashed. Also replace the fragile [:-1] slice with an explicit non-custom filter. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -145,9 +145,9 @@ EMBEDDING_VENDORS = {
|
||||
# Custom provider — any OpenAI-compatible /embeddings endpoint. The
|
||||
# user must supply api_key + api_base + model via the web console
|
||||
# (stored in custom_providers list or legacy custom_api_key / custom_api_base).
|
||||
# Dimensions defaults to 1024 (most Chinese vendors) but can be
|
||||
# overridden via config's embedding_dimensions. No dim-param support
|
||||
# assumption — safest default for unknown endpoints.
|
||||
# Dimensions defaults to 1024 but can be overridden via config's
|
||||
# embedding_dimensions. No dim-param support assumption — safest
|
||||
# default for unknown endpoints.
|
||||
"custom": {
|
||||
"default_base_url": "",
|
||||
"default_model": "",
|
||||
|
||||
Reference in New Issue
Block a user