fixed bugs

This commit is contained in:
belviskhoremk
2026-02-23 16:47:03 +00:00
parent e151c42e81
commit 07c4c55072
6 changed files with 254 additions and 41 deletions

View File

@@ -53,7 +53,6 @@ async def create_chatbot(data: ChatbotCreate, user=Depends(get_current_user)):
vector_store.create_collection(collection_name)
except Exception as e:
logger.error(f"Failed to create Qdrant collection: {e}")
# Continue without vector store for now
collection_name = None
chatbot_data = {
@@ -67,6 +66,7 @@ async def create_chatbot(data: ChatbotCreate, user=Depends(get_current_user)):
"max_tokens": data.max_tokens,
"primary_color": data.primary_color,
"welcome_message": data.welcome_message,
"logo_url": data.logo_url,
"category": data.category,
"industry": data.industry,
"languages": data.languages,
@@ -227,6 +227,7 @@ def _format_chatbot(chatbot: dict, supabase) -> ChatbotResponse:
max_tokens=chatbot.get("max_tokens", 1000),
primary_color=chatbot.get("primary_color", "#6366f1"),
welcome_message=chatbot.get("welcome_message", "Hello! How can I help?"),
logo_url=chatbot.get("logo_url"),
category=chatbot.get("category"),
industry=chatbot.get("industry"),
languages=chatbot.get("languages", ["en"]),
@@ -237,4 +238,4 @@ def _format_chatbot(chatbot: dict, supabase) -> ChatbotResponse:
conversation_count=conv_count.count or 0,
created_at=chatbot.get("created_at"),
published_at=chatbot.get("published_at"),
)
)