mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Upgrade tenacity to respect min time for exponential backoff
Fix for issue is in tenacity 9.0.0. But older langchain required tenacity <0.9.0. Explicitly pin version of langchain sub packages to avoid indexing and doc parsing breakage.
This commit is contained in:
@@ -44,7 +44,7 @@ dependencies = [
|
|||||||
"jinja2 == 3.1.6",
|
"jinja2 == 3.1.6",
|
||||||
"openai >= 1.0.0",
|
"openai >= 1.0.0",
|
||||||
"tiktoken >= 0.3.2",
|
"tiktoken >= 0.3.2",
|
||||||
"tenacity >= 8.2.2",
|
"tenacity >= 9.0.0",
|
||||||
"magika ~= 0.5.1",
|
"magika ~= 0.5.1",
|
||||||
"pillow ~= 10.0.0",
|
"pillow ~= 10.0.0",
|
||||||
"pydantic[email] >= 2.0.0",
|
"pydantic[email] >= 2.0.0",
|
||||||
@@ -57,10 +57,9 @@ dependencies = [
|
|||||||
"torch == 2.6.0",
|
"torch == 2.6.0",
|
||||||
"uvicorn == 0.30.6",
|
"uvicorn == 0.30.6",
|
||||||
"aiohttp ~= 3.9.0",
|
"aiohttp ~= 3.9.0",
|
||||||
"langchain == 0.2.5",
|
"langchain-text-splitters == 0.3.1",
|
||||||
"langchain-community == 0.2.5",
|
"langchain-community == 0.3.3",
|
||||||
"requests >= 2.26.0",
|
"requests >= 2.26.0",
|
||||||
"tenacity == 8.3.0",
|
|
||||||
"anyio ~= 4.8.0",
|
"anyio ~= 4.8.0",
|
||||||
"pymupdf == 1.24.11",
|
"pymupdf == 1.24.11",
|
||||||
"django == 5.1.8",
|
"django == 5.1.8",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from abc import ABC, abstractmethod
|
|||||||
from itertools import repeat
|
from itertools import repeat
|
||||||
from typing import Any, Callable, List, Set, Tuple
|
from typing import Any, Callable, List, Set, Tuple
|
||||||
|
|
||||||
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from khoj.database.adapters import (
|
from khoj.database.adapters import (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from datetime import datetime, timedelta
|
|||||||
from typing import AsyncGenerator, Dict, List, Optional
|
from typing import AsyncGenerator, Dict, List, Optional
|
||||||
|
|
||||||
import pyjson5
|
import pyjson5
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
|
|
||||||
from khoj.database.models import Agent, ChatModel, KhojUser
|
from khoj.database.models import Agent, ChatModel, KhojUser
|
||||||
from khoj.processor.conversation import prompts
|
from khoj.processor.conversation import prompts
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from time import perf_counter
|
|||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
|
|
||||||
import anthropic
|
import anthropic
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
from tenacity import (
|
from tenacity import (
|
||||||
before_sleep_log,
|
before_sleep_log,
|
||||||
retry,
|
retry,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from datetime import datetime, timedelta
|
|||||||
from typing import AsyncGenerator, Dict, List, Optional
|
from typing import AsyncGenerator, Dict, List, Optional
|
||||||
|
|
||||||
import pyjson5
|
import pyjson5
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from khoj.database.models import Agent, ChatModel, KhojUser
|
from khoj.database.models import Agent, ChatModel, KhojUser
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import httpx
|
|||||||
from google import genai
|
from google import genai
|
||||||
from google.genai import errors as gerrors
|
from google.genai import errors as gerrors
|
||||||
from google.genai import types as gtypes
|
from google.genai import types as gtypes
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from tenacity import (
|
from tenacity import (
|
||||||
before_sleep_log,
|
before_sleep_log,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from time import perf_counter
|
|||||||
from typing import Any, AsyncGenerator, Dict, List, Optional, Union
|
from typing import Any, AsyncGenerator, Dict, List, Optional, Union
|
||||||
|
|
||||||
import pyjson5
|
import pyjson5
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
from llama_cpp import Llama
|
from llama_cpp import Llama
|
||||||
|
|
||||||
from khoj.database.models import Agent, ChatModel, KhojUser
|
from khoj.database.models import Agent, ChatModel, KhojUser
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from datetime import datetime, timedelta
|
|||||||
from typing import AsyncGenerator, Dict, List, Optional
|
from typing import AsyncGenerator, Dict, List, Optional
|
||||||
|
|
||||||
import pyjson5
|
import pyjson5
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
from openai.lib._pydantic import _ensure_strict_json_schema
|
from openai.lib._pydantic import _ensure_strict_json_schema
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from langchain.prompts import PromptTemplate
|
from langchain_core.prompts import PromptTemplate
|
||||||
|
|
||||||
## Personality
|
## Personality
|
||||||
## --
|
## --
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import pyjson5
|
|||||||
import requests
|
import requests
|
||||||
import tiktoken
|
import tiktoken
|
||||||
import yaml
|
import yaml
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
from llama_cpp import LlamaTokenizer
|
from llama_cpp import LlamaTokenizer
|
||||||
from llama_cpp.llama import Llama
|
from llama_cpp.llama import Llama
|
||||||
from transformers import AutoTokenizer, PreTrainedTokenizer, PreTrainedTokenizerFast
|
from transformers import AutoTokenizer, PreTrainedTokenizer, PreTrainedTokenizerFast
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
import tiktoken
|
import tiktoken
|
||||||
from langchain.schema import ChatMessage
|
from langchain_core.messages.chat import ChatMessage
|
||||||
|
|
||||||
from khoj.processor.conversation import utils
|
from khoj.processor.conversation import utils
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user