Skip to content

Commit 023c248

Browse files
jsonbaileyclaude
andcommitted
fix: remove implementation detail comments from run() docstrings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ad0e0b9 commit 023c248

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

packages/ai-providers/server-ai-langchain/src/ldai_langchain/langchain_model_runner.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, List, Optional
1+
from typing import Any, Dict, List, Optional, cast
22

33
from langchain_core.chat_history import InMemoryChatMessageHistory
44
from langchain_core.language_models.chat_models import BaseChatModel
@@ -28,7 +28,7 @@ class LangChainModelRunner(Runner):
2828
def __init__(self, llm: BaseChatModel, config_messages: Optional[List[LDMessage]] = None):
2929
self._llm = llm
3030
self._chat_history = InMemoryChatMessageHistory(
31-
messages=convert_messages_to_langchain(config_messages or [])
31+
messages=cast(List[BaseMessage], convert_messages_to_langchain(config_messages or []))
3232
)
3333

3434
def get_llm(self) -> BaseChatModel:
@@ -47,11 +47,6 @@ async def run(
4747
"""
4848
Run the LangChain model with the given input.
4949
50-
Sends the full chat history (seeded with config messages at construction
51-
time via InMemoryChatMessageHistory) plus the new user message. On
52-
success, appends the user/assistant exchange so subsequent calls include
53-
prior context.
54-
5550
:param input: A string prompt
5651
:param output_type: Optional JSON schema dict requesting structured output.
5752
When provided, ``parsed`` on the returned :class:`RunnerResult` is

packages/ai-providers/server-ai-openai/src/ldai_openai/openai_model_runner.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ async def run(
4343
"""
4444
Run the OpenAI model with the given input.
4545
46-
Sends the full conversation history (seeded with config messages at
47-
construction time) plus the new user message. On success, appends the
48-
user/assistant exchange to history so subsequent calls include prior context.
49-
5046
:param input: A string prompt
5147
:param output_type: Optional JSON schema dict requesting structured output.
5248
When provided, ``parsed`` on the returned :class:`RunnerResult` is

0 commit comments

Comments
 (0)