Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added assistant selection #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ <h1>Noa <b>Playground</b></h1>
</div>
<div class="config">

<select name="assistant" id="assistantSelection">
<option value="gpt">OpenAI GPT</option>
<option value="claude">Anthropic Claude</option>
<option value="groq">Groq / Meta Llama 3</option>
<option value="perplexity">Perplexity</option>
</select>

<select name="web_search" id="web_search" style="display: none;">
<option value="serp">SerpApi</option>
<option value="dataforseo">DataForSEO</option>
Expand Down
5 changes: 5 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const webSearchOptions = document.getElementById('web_search');
const serpApiImageModeOptions = document.getElementById('serpapi_image_mode');
const addressText = document.getElementById("address");
const clearButton = document.getElementById('clearButton')
const assistantSelection = document.getElementById("assistantSelection");
const visionModel = document.getElementById('visionModel')
const generateImage = document.getElementById('generateImage')
const systemMessageText = document.getElementById('systemMessage')
Expand Down Expand Up @@ -188,12 +189,16 @@ submitButton.onclick = async function () {
if (textInput.value == "") {
return
}
let assistant = assistantSelection.value
let vision_model = visionModel.value
let generate_image = generateImage.checked
const assistantConfig = {
"search_api": webSearchOptions.value,
"engine": serpApiImageModeOptions.value, // ignored for every other search_api
}
if (assistant) {
assistantConfig["assistant"] = assistant
}
if (vision_model) {
assistantConfig["vision"] = vision_model
}
Expand Down