Skip to content

Commit

Permalink
bugfix: set openAI as default embedding model
Browse files Browse the repository at this point in the history
  • Loading branch information
skeptrunedev committed Apr 4, 2024
1 parent 63e1f53 commit 89690b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dashboard/src/components/NewDatasetModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export const NewDatasetModal = (props: NewDatasetModalProps) => {
const organizationId = userContext.selectedOrganizationId?.();
if (!organizationId) return;

const curServerConfig = serverConfig();

fetch(`${apiHost}/dataset`, {
method: "POST",
credentials: "include",
Expand All @@ -53,7 +55,7 @@ export const NewDatasetModal = (props: NewDatasetModalProps) => {
body: JSON.stringify({
dataset_name: name(),
organization_id: organizationId,
server_configuration: serverConfig(),
server_configuration: curServerConfig,
client_configuration: "{}",
}),
})
Expand Down Expand Up @@ -209,7 +211,7 @@ export const NewDatasetModal = (props: NewDatasetModalProps) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
)?.name ?? availableEmbeddingModels[0].name
}
onSelect={(e) => {
onChange={(e) => {
const selectedModel = availableEmbeddingModels.find(
(model) => model.name === e.currentTarget.value,
);
Expand Down Expand Up @@ -237,7 +239,7 @@ export const NewDatasetModal = (props: NewDatasetModalProps) => {
</div>
</div>

<div class="mt-3 flex items-center justify-between">
<div class="mt-4 flex items-center justify-between">
<button
type="button"
class="rounded-md border px-2 py-1 text-sm font-semibold leading-6 hover:bg-neutral-50 focus:outline-magenta-500"
Expand Down

0 comments on commit 89690b4

Please sign in to comment.