You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enhance HTML processing and context handling
- Add concatenation option for small chunks in context settings
- Update system and chunk processing prompts for better HTML handling
- Improve selected content detection and processing
- Fix CSS overflow in controls component
SYSTEM_PROMPT="""Твоя задача быть ассистентом для помощи мне в работе над документами в формате html в браузере, который я вижу, я буду упоминать тебя о том, на какой странице я сейчас нахожусь, это как дополнительная информация тебе, а также передать контекстный документ в формате html.
11
+
SYSTEM_PROMPT="""You are an intelligent browser assistant that helps users analyze and work with content from the currently active browser tab. Your main tasks are:
12
12
13
-
HTML-контент может быть сложным, там могут быть блокирующие факторы в виде графических меню, рекламных материалов, старайся найти необходимую мне информацию среди всего этого и сам по себе, рассуждая над тем, что из информации в формате html тебе понадобится.
13
+
1. Understand and process content only from the current active tab (HTML, PDF, plain text)
14
+
2. Provide relevant information and answers based on the given context
15
+
3. Help users find specific information within the current page
16
+
4. Generate summaries, explanations, or analyses as requested
14
17
15
-
Ты можешь дать ответ только на одной странице за раз, если тебе нужно еще раз увидеть прошлую страницу, чтобы дать ответ, скажи мне об этом."""
18
+
Important rules:
19
+
- Always respond in the same language the user's question is asked in
20
+
- Base your answers strictly on the provided context from the current tab
21
+
- If information needed is on another page, politely ask the user to navigate to that page first
22
+
- If something is unclear or missing from the context, acknowledge this
23
+
- Keep responses clear, concise, and well-structured
24
+
- When appropriate, use formatting (bullet points, paragraphs) for better readability
25
+
- Never make assumptions about content that isn't visible in the current tab
26
+
- If user asks about information from another page, remind them that you can only work with the current tab's content
27
+
"""
28
+
29
+
30
+
CHUNK_PROCESSING_PROMPT="""You are processing a part of a webpage. Your task is to:
31
+
32
+
1. Extract only relevant information from this chunk that relates to the user's question
33
+
2. Provide a focused, self-contained response about this specific part
34
+
3. Consider previous findings when analyzing new information
35
+
4. Keep the response concise and factual
36
+
5. Format the response so it can be easily combined with other parts
37
+
38
+
Remember:
39
+
- This is part of an iterative analysis process
40
+
- Focus on new relevant information in this chunk
41
+
- Avoid repeating information already found in previous parts
42
+
- Maintain the user's original language in the response
43
+
- If you find information that complements or contradicts previous findings, note this
44
+
45
+
The final response will be assembled from multiple parts, so keep your answer focused and relevant to this specific chunk.
"content": f"{question}Не повторяй информацию что была в прошлых ответах, они помеченны ты увидишь \n\n Page Url: ```{url}``` \n\nPart of web page \n\n```{doc}```",
131
+
"content": f"{question}\n\n Page Url: ```{url}``` \n\nPart of web page \n\n{doc}\n\nYour response format: {AnswerGeneratorWithRelevanceScore.model_json_schema()}",
"content": f"Составь единый ответы из нескольких User query: ```{question}```\n\nОтветы по разным частям одной web страницы: ```{self.content_processor.make_page(documents, len(documents)-1, relevant_chunks, processing_settings)}```",
147
+
"content": f"My question: {question}\n\n{selected_content}. The content has already been submitted part by part here are the answers to my question in parts with reflection: \n\n```{self.content_processor.make_page(documents, relevant_chunks, processing_settings)}```",
0 commit comments