mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-30 12:30:01 +00:00
improve object typing
This commit is contained in:
parent
b616d1ad17
commit
212d3a33b0
7 changed files with 151 additions and 140 deletions
|
|
@ -4,9 +4,10 @@ from math import ceil
|
|||
from loguru import logger
|
||||
from pydub import AudioSegment
|
||||
|
||||
from open_notebook.domain.models import model_manager
|
||||
from open_notebook.graphs.content_processing.state import SourceState
|
||||
from open_notebook.models import model_manager
|
||||
|
||||
# todo: remove reference to model_manager
|
||||
# future: parallelize the transcription process
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ from datetime import datetime
|
|||
from langchain.tools import tool
|
||||
|
||||
|
||||
# todo: turn this into a system prompt variable
|
||||
@tool
|
||||
def get_current_timestamp() -> str:
|
||||
"""
|
||||
|
|
@ -10,17 +11,3 @@ def get_current_timestamp() -> str:
|
|||
Returns the current timestamp in the format YYYYMMDDHHmmss.
|
||||
"""
|
||||
return datetime.now().strftime("%Y%m%d%H%M%S")
|
||||
|
||||
|
||||
# @tool
|
||||
# def doc_query(doc_id: str, question: str):
|
||||
# """
|
||||
# name: doc_query
|
||||
# Use this tool if you need to investigate into a particular document.
|
||||
# Another LLM will read the document and answer the question that you might have.
|
||||
# Use this when the user question cannot be answered with the content you have in context.
|
||||
# """
|
||||
# from temp.doc_query import graph
|
||||
|
||||
# result = graph.invoke({"doc_id": doc_id, "question": question})
|
||||
# return result["answer"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from langchain.output_parsers import OutputFixingParser
|
|||
from langchain_core.messages import AIMessage
|
||||
from loguru import logger
|
||||
|
||||
from open_notebook.models import model_manager
|
||||
from open_notebook.domain.models import model_manager
|
||||
from open_notebook.prompter import Prompter
|
||||
from open_notebook.utils import token_count
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue