Unpin langgraph stack; upgrade langchain-core for Reviver compat
Closes #10 Remove force-pins on langgraph-checkpoint/prebuilt/sdk and bump langchain-core (and companions) so checkpoint 4.x Reviver(allowed_objects=...) works. Keep langgraph on a supported range matching langchain 1.3.x. Also switch BaseMessage .text() calls to the .text property.
This commit is contained in:
@@ -126,7 +126,7 @@ class AsyncLLMService(LLMService):
|
||||
# return "\n".join(
|
||||
# f"{'User' if prompt.is_user else 'AI'}: {prompt.text}" for prompt in prompts
|
||||
# )
|
||||
return "\n".join([f"{"User" if prompt.type=="human" else "AI"}: {prompt.text()}" for prompt in conversation])
|
||||
return "\n".join([f"{"User" if prompt.type=="human" else "AI"}: {prompt.text}" for prompt in conversation])
|
||||
|
||||
async def _get_recent_messages(self, conversation: list) -> str:
|
||||
"""Async version of format conversation history."""
|
||||
@@ -139,7 +139,7 @@ class AsyncLLMService(LLMService):
|
||||
# return "\n".join(
|
||||
# f"{'User' if prompt.is_user else 'AI'}: {prompt.text}" for prompt in prompts
|
||||
# )
|
||||
return "\n".join([f"{"User" if prompt.type=="human" else "AI"}: {prompt.text()}" for prompt in conversation])
|
||||
return "\n".join([f"{"User" if prompt.type=="human" else "AI"}: {prompt.text}" for prompt in conversation])
|
||||
|
||||
async def generate_response(
|
||||
self, conversation: Conversation, query: str, conversation_id: int, **kwargs
|
||||
|
||||
@@ -330,7 +330,7 @@ class AsyncRAGService(RAGService):
|
||||
"""Format conversation history for the prompt."""
|
||||
return "\n".join(
|
||||
[
|
||||
f'{"User" if prompt.type == "human" else "AI"}: {prompt.text()}'
|
||||
f'{"User" if prompt.type == "human" else "AI"}: {prompt.text}'
|
||||
for prompt in conversation
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user