patch[Community] Optimize methods in several ChatLoaders (#24806)

There are some static methods in ChatLoaders, try to add @staticmethod
decorator for them.
This commit is contained in:
ZhangShenao
2024-08-23 23:00:41 +08:00
committed by GitHub
parent 644e0d3463
commit b38c83ff93
4 changed files with 14 additions and 7 deletions

View File

@@ -38,7 +38,8 @@ class LangSmithRunChatLoader(BaseChatLoader):
self.runs = runs
self.client = client or Client()
def _load_single_chat_session(self, llm_run: "Run") -> ChatSession:
@staticmethod
def _load_single_chat_session(llm_run: "Run") -> ChatSession:
"""
Convert an individual LangSmith LLM run to a ChatSession.