Skip to content
Snippets Groups Projects
Commit 643af062 authored by Jonas Eppelt's avatar Jonas Eppelt
Browse files

make it possible to use different models

parent e2b8154a
Branches
No related tags found
No related merge requests found
......@@ -90,10 +90,10 @@ class ChatETProvider(BaseProvider, ChatOllama):
)
registry = True
# model: str = "deepseek-r1:8b"
# fields = [
# TextField(key="base_url", label="Base API URL (optional)", format="text"),
# TextField(key="model", label="Model ID", format="text"),
# ]
fields = [
TextField(key="base_url", label="Base API URL (optional)", format="text"),
# TextField(key="model", label="Model ID", format="text"),
]
help: str = (
"available models:" + ", \n ".join(models) + ""
)
......@@ -137,17 +137,17 @@ class ChatETProvider(BaseProvider, ChatOllama):
template_format="jinja2",
)
def invoke(self, *args, **kwargs):
print(*args, **kwargs)
res = super().invoke(*args, **kwargs)
print(res)
return res
async def ainvoke(self, *args, **kwargs):
print(*args, **kwargs)
res = await super().ainvoke(*args, **kwargs)
print(res)
return res
# def invoke(self, *args, **kwargs):
# print(*args, **kwargs)
# res = super().invoke(*args, **kwargs)
# print(res)
# return res
# async def ainvoke(self, *args, **kwargs):
# print(*args, **kwargs)
# res = await super().ainvoke(*args, **kwargs)
# print(res)
# return res
from jupyter_ai.chat_handlers.base import BaseChatHandler, SlashCommandRoutingType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment