Merge with remote

This commit is contained in:
sabaimran
2023-11-10 17:50:15 -08:00
4 changed files with 32 additions and 25 deletions

View File

@@ -109,7 +109,7 @@
display: grid;
grid-template-rows: repeat(3, 1fr);
gap: 8px;
padding: 24px 16px;
padding: 24px 16px 8px;
width: 320px;
height: 180px;
background: var(--background-color);
@@ -162,10 +162,13 @@
color: grey;
font-size: 16px;
}
.card-button-row {
.card-description-row {
padding-top: 4px;
}
.card-action-row {
display: grid;
grid-template-columns: auto;
text-align: right;
grid-auto-flow: row;
justify-content: left;
}
.card-button {
border: none;
@@ -287,6 +290,7 @@
select#chat-models {
margin-bottom: 0;
padding: 8px;
}

View File

@@ -29,7 +29,6 @@
{% 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>
</a>
</div>
<div id="clear-computer" class="card-action-row"
style="display: {% if not current_model_state.computer %}none{% endif %}">
<button class="card-button" onclick="clearContentType('computer')">
@@ -37,6 +36,7 @@
</button>
</div>
</div>
</div>
<div class="card">
<div class="card-title-row">
<img class="card-icon" src="/static/assets/icons/github.svg" alt="Github">
@@ -61,7 +61,6 @@
{% 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>
</a>
</div>
<div id="clear-github"
class="card-action-row"
style="display: {% if not current_model_state.github %}none{% endif %}">
@@ -70,6 +69,7 @@
</button>
</div>
</div>
</div>
<div class="card">
<div class="card-title-row">
<img class="card-icon" src="/static/assets/icons/notion.svg" alt="Notion">
@@ -94,7 +94,6 @@
{% 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>
</a>
</div>
<div id="clear-notion"
class="card-action-row"
style="display: {% if not current_model_state.notion %}none{% endif %}">
@@ -105,6 +104,7 @@
</div>
</div>
</div>
</div>
<div class="section">
<h2 class="section-title">Features</h2>
<div id="features-hint-text"></div>

View File

@@ -235,7 +235,7 @@ def chat_client(search_config: SearchConfig, default_user2: KhojUser):
OpenAIProcessorConversationConfigFactory()
UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model)
state.anonymous_mode = False
state.anonymous_mode = True
app = FastAPI()
@@ -253,7 +253,9 @@ def chat_client_no_background(search_config: SearchConfig, default_user2: KhojUs
# Initialize Processor from Config
if os.getenv("OPENAI_API_KEY"):
chat_model = ChatModelOptionsFactory(chat_model="gpt-3.5-turbo", model_type="openai")
OpenAIProcessorConversationConfigFactory()
UserConversationProcessorConfigFactory(user=default_user2, setting=chat_model)
state.anonymous_mode = True

View File

@@ -307,6 +307,7 @@ def test_ask_for_clarification_if_not_enough_context_in_question(chat_client_no_
"which one is",
"which of namita's sons",
"the birth order",
"provide more context",
]
assert response.status_code == 200
assert any([expected_response in response_message.lower() for expected_response in expected_responses]), (