Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobholamovic committed Dec 22, 2023
1 parent 1a5157b commit d54a93b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions erniebot-agent/src/erniebot_agent/agents/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
ToolResponse,
)
from erniebot_agent.chat_models.base import ChatModel
from erniebot_agent.file import protocol
from erniebot_agent.file import get_global_file_manager, protocol
from erniebot_agent.file.base import File
from erniebot_agent.file.file_manager import FileManager
from erniebot_agent.memory.base import Memory
from erniebot_agent.memory import Message, SystemMessage
from erniebot_agent.memory.base import Memory
from erniebot_agent.tools.base import BaseTool
from erniebot_agent.tools.tool_manager import ToolManager
from erniebot_agent.utils.mixins import GradioMixin
Expand Down Expand Up @@ -77,7 +77,7 @@ def __init__(
else:
self._callback_manager = CallbackManager(callbacks)
if file_manager is None:
file_manager = file.get_global_file_manager()
file_manager = get_global_file_manager()
self.plugins = plugins
self._file_manager = file_manager
self._init_file_repr()
Expand Down
4 changes: 2 additions & 2 deletions erniebot-agent/src/erniebot_agent/file/global_file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import asyncio_atexit # type: ignore

from erniebot_agent.file_io.file_manager import FileManager
from erniebot_agent.file_io.remote_file import AIStudioFileClient
from erniebot_agent.file.file_manager import FileManager
from erniebot_agent.file.remote_file import AIStudioFileClient
from erniebot_agent.utils import config_from_environ as C

_global_file_manager: Optional[FileManager] = None
Expand Down
7 changes: 6 additions & 1 deletion erniebot-agent/src/erniebot_agent/tools/remote_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@

from erniebot_agent.file import get_global_file_manager
from erniebot_agent.file.file_manager import FileManager
from erniebot_agent.memory.messages import AIMessage, FunctionCall, HumanMessage, Message
from erniebot_agent.memory.messages import (
AIMessage,
FunctionCall,
HumanMessage,
Message,
)
from erniebot_agent.tools.remote_tool import RemoteTool, tool_registor
from erniebot_agent.tools.schema import (
Endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
import os
from typing import Optional

<<<<<<<< HEAD:erniebot-agent/src/erniebot_agent/utils/config_from_environ.py

def get_global_access_token() -> Optional[str]:
return _get_val_from_env_var("EB_AGENT_ACCESS_TOKEN")
========
from erniebot_agent.file.file_manager import FileManager
from erniebot_agent.file.remote_file import AIStudioFileClient
>>>>>>>> official:erniebot-agent/src/erniebot_agent/file/factory.py


def get_global_save_dir() -> Optional[str]:
Expand Down
4 changes: 2 additions & 2 deletions erniebot-agent/tests/unit_tests/file/test_local_file.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pathlib
import tempfile

import erniebot_agent.file_io.protocol as protocol
from erniebot_agent.file_io.local_file import LocalFile, create_local_file_from_path
import erniebot_agent.file.protocol as protocol
from erniebot_agent.file.local_file import LocalFile, create_local_file_from_path


def test_create_local_file_from_path():
Expand Down

0 comments on commit d54a93b

Please sign in to comment.