Fix lint issues (#1656)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
from typing import Optional,ClassVar
|
from typing import Optional,ClassVar
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, field_validator, model_validator
|
from pydantic import BaseModel, Field, model_validator
|
||||||
|
|
||||||
class ChromaDbConfig(BaseModel):
|
class ChromaDbConfig(BaseModel):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from typing import Optional,ClassVar
|
from typing import Optional,ClassVar
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, field_validator, model_validator
|
from pydantic import BaseModel, Field, model_validator
|
||||||
|
|
||||||
class QdrantConfig(BaseModel):
|
class QdrantConfig(BaseModel):
|
||||||
from qdrant_client import QdrantClient
|
from qdrant_client import QdrantClient
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import logging
|
import logging
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
|
||||||
import uuid
|
import uuid
|
||||||
import pytz
|
import pytz
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, ValidationError
|
from pydantic import ValidationError
|
||||||
|
|
||||||
from mem0.llms.utils.tools import (
|
from mem0.llms.utils.tools import (
|
||||||
ADD_MEMORY_TOOL,
|
ADD_MEMORY_TOOL,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import sqlite3
|
import sqlite3
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
|
|
||||||
class SQLiteManager:
|
class SQLiteManager:
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ class LlmFactory:
|
|||||||
"together": "mem0.llms.together.TogetherLLM",
|
"together": "mem0.llms.together.TogetherLLM",
|
||||||
"aws_bedrock": "mem0.llms.aws_bedrock.AWSBedrockLLM",
|
"aws_bedrock": "mem0.llms.aws_bedrock.AWSBedrockLLM",
|
||||||
"litellm": "mem0.llms.litellm.LiteLLM",
|
"litellm": "mem0.llms.litellm.LiteLLM",
|
||||||
"ollama": "mem0.llms.ollama.OllamaLLM",
|
|
||||||
"azure_openai": "mem0.llms.azure_openai.AzureOpenAILLM",
|
"azure_openai": "mem0.llms.azure_openai.AzureOpenAILLM",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Optional, Dict, Type
|
from typing import Optional, Dict
|
||||||
from pydantic import BaseModel, Field, model_validator
|
from pydantic import BaseModel, Field, model_validator
|
||||||
|
|
||||||
class VectorStoreConfig(BaseModel):
|
class VectorStoreConfig(BaseModel):
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ def test_completions_create_with_system_message(mock_memory_client, mock_litellm
|
|||||||
mock_memory_client.search.return_value = [{"memory": "Some relevant memory"}]
|
mock_memory_client.search.return_value = [{"memory": "Some relevant memory"}]
|
||||||
mock_litellm.completion.return_value = {"choices": [{"message": {"content": "I'm doing well, thank you!"}}]}
|
mock_litellm.completion.return_value = {"choices": [{"message": {"content": "I'm doing well, thank you!"}}]}
|
||||||
|
|
||||||
response = completions.create(
|
completions.create(
|
||||||
model="gpt-3.5-turbo",
|
model="gpt-3.5-turbo",
|
||||||
messages=messages,
|
messages=messages,
|
||||||
user_id="test_user"
|
user_id="test_user"
|
||||||
|
|||||||
Reference in New Issue
Block a user