feat: new chat working stateless. Added citation logic.

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-20 23:15:49 -08:00
parent 24f438a39e
commit 947087452f
10 changed files with 441 additions and 160 deletions

View file

@ -87,10 +87,11 @@ def create_chat_litellm_from_config(llm_config: dict) -> ChatLiteLLM | None:
provider_prefix = provider_map.get(provider, provider.lower())
model_string = f"{provider_prefix}/{llm_config['model_name']}"
# Create ChatLiteLLM instance
# Create ChatLiteLLM instance with streaming enabled
litellm_kwargs = {
"model": model_string,
"api_key": llm_config.get("api_key"),
"streaming": True, # Enable streaming for real-time token streaming
}
# Add optional parameters

View file

@ -12,10 +12,9 @@ from langchain_core.messages import HumanMessage
from sqlalchemy.ext.asyncio import AsyncSession
from app.agents.new_chat.chat_deepagent import (
create_chat_litellm_from_config,
create_surfsense_deep_agent,
load_llm_config_from_yaml,
)
from app.agents.new_chat.llm_config import create_chat_litellm_from_config, load_llm_config_from_yaml
from app.services.connector_service import ConnectorService
from app.services.new_streaming_service import VercelStreamingService