mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 13:26:13 +00:00
Merge with remote
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: repeat(3, 1fr);
|
grid-template-rows: repeat(3, 1fr);
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 24px 16px;
|
padding: 24px 16px 8px;
|
||||||
width: 320px;
|
width: 320px;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
background: var(--background-color);
|
background: var(--background-color);
|
||||||
@@ -162,10 +162,13 @@
|
|||||||
color: grey;
|
color: grey;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.card-button-row {
|
.card-description-row {
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
.card-action-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto;
|
grid-auto-flow: row;
|
||||||
text-align: right;
|
justify-content: left;
|
||||||
}
|
}
|
||||||
.card-button {
|
.card-button {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -287,6 +290,7 @@
|
|||||||
|
|
||||||
select#chat-models {
|
select#chat-models {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
<div id="clear-computer" class="card-action-row"
|
<div id="clear-computer" class="card-action-row"
|
||||||
style="display: {% if not current_model_state.computer %}none{% endif %}">
|
style="display: {% if not current_model_state.computer %}none{% endif %}">
|
||||||
<button class="card-button" onclick="clearContentType('computer')">
|
<button class="card-button" onclick="clearContentType('computer')">
|
||||||
@@ -37,6 +36,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-title-row">
|
<div class="card-title-row">
|
||||||
<img class="card-icon" src="/static/assets/icons/github.svg" alt="Github">
|
<img class="card-icon" src="/static/assets/icons/github.svg" alt="Github">
|
||||||
@@ -61,7 +61,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
<div id="clear-github"
|
<div id="clear-github"
|
||||||
class="card-action-row"
|
class="card-action-row"
|
||||||
style="display: {% if not current_model_state.github %}none{% endif %}">
|
style="display: {% if not current_model_state.github %}none{% endif %}">
|
||||||
@@ -70,6 +69,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-title-row">
|
<div class="card-title-row">
|
||||||
<img class="card-icon" src="/static/assets/icons/notion.svg" alt="Notion">
|
<img class="card-icon" src="/static/assets/icons/notion.svg" alt="Notion">
|
||||||
@@ -94,7 +94,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"></path></svg>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
<div id="clear-notion"
|
<div id="clear-notion"
|
||||||
class="card-action-row"
|
class="card-action-row"
|
||||||
style="display: {% if not current_model_state.notion %}none{% endif %}">
|
style="display: {% if not current_model_state.notion %}none{% endif %}">
|
||||||
@@ -105,6 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2 class="section-title">Features</h2>
|
<h2 class="section-title">Features</h2>
|
||||||
<div id="features-hint-text"></div>
|
<div id="features-hint-text"></div>
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ def chat_client(search_config: SearchConfig, default_user2: KhojUser):
|
|||||||
OpenAIProcessorConversationConfigFactory()
|
OpenAIProcessorConversationConfigFactory()
|
||||||
UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model)
|
UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model)
|
||||||
|
|
||||||
state.anonymous_mode = False
|
state.anonymous_mode = True
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
@@ -253,7 +253,9 @@ def chat_client_no_background(search_config: SearchConfig, default_user2: KhojUs
|
|||||||
|
|
||||||
# Initialize Processor from Config
|
# Initialize Processor from Config
|
||||||
if os.getenv("OPENAI_API_KEY"):
|
if os.getenv("OPENAI_API_KEY"):
|
||||||
|
chat_model = ChatModelOptionsFactory(chat_model="gpt-3.5-turbo", model_type="openai")
|
||||||
OpenAIProcessorConversationConfigFactory()
|
OpenAIProcessorConversationConfigFactory()
|
||||||
|
UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model)
|
||||||
|
|
||||||
state.anonymous_mode = True
|
state.anonymous_mode = True
|
||||||
|
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ def test_ask_for_clarification_if_not_enough_context_in_question(chat_client_no_
|
|||||||
"which one is",
|
"which one is",
|
||||||
"which of namita's sons",
|
"which of namita's sons",
|
||||||
"the birth order",
|
"the birth order",
|
||||||
|
"provide more context",
|
||||||
]
|
]
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert any([expected_response in response_message.lower() for expected_response in expected_responses]), (
|
assert any([expected_response in response_message.lower() for expected_response in expected_responses]), (
|
||||||
|
|||||||
Reference in New Issue
Block a user