mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-05-03 13:50:31 +00:00
Api podcast migration (#93)
Creates the API layer for Open Notebook Creates a services API gateway for the Streamlit front-end Migrates the SurrealDB SDK to the official one Change all database calls to async New podcast framework supporting multiple speaker configurations Implement the surreal-commands library for async processing Improve docker image and docker-compose configurations
This commit is contained in:
parent
9814103cc8
commit
d7b0fff954
125 changed files with 16177 additions and 3296 deletions
|
|
@ -6,7 +6,7 @@ from open_notebook.domain.models import model_manager
|
|||
from open_notebook.utils import token_count
|
||||
|
||||
|
||||
def provision_langchain_model(
|
||||
async def provision_langchain_model(
|
||||
content, model_id, default_type, **kwargs
|
||||
) -> BaseChatModel:
|
||||
"""
|
||||
|
|
@ -21,11 +21,11 @@ def provision_langchain_model(
|
|||
logger.debug(
|
||||
f"Using large context model because the content has {tokens} tokens"
|
||||
)
|
||||
model = model_manager.get_default_model("large_context", **kwargs)
|
||||
model = await model_manager.get_default_model("large_context", **kwargs)
|
||||
elif model_id:
|
||||
model = model_manager.get_model(model_id, **kwargs)
|
||||
model = await model_manager.get_model(model_id, **kwargs)
|
||||
else:
|
||||
model = model_manager.get_default_model(default_type, **kwargs)
|
||||
model = await model_manager.get_default_model(default_type, **kwargs)
|
||||
|
||||
logger.debug(f"Using model: {model}")
|
||||
assert isinstance(model, LanguageModel), f"Model is not a LanguageModel: {model}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue