commit
66700bd30e
7 changed files with 534 additions and 424 deletions
|
|
@ -12,4 +12,4 @@ WORKDIR $HOME/app
|
||||||
COPY --chown=user . $HOME/app
|
COPY --chown=user . $HOME/app
|
||||||
|
|
||||||
RUN pip install langflow>==0.0.86 -U --user
|
RUN pip install langflow>==0.0.86 -U --user
|
||||||
CMD ["python", "-m", "langflow", "--host", "0.0.0.0", "--port", "7860"]
|
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ class FrontendNode(BaseModel):
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handles specific field values for certain fields."""
|
"""Handles specific field values for certain fields."""
|
||||||
if key == "headers":
|
if key == "headers":
|
||||||
field.value = """{'Authorization': 'Bearer <token>'}"""
|
field.value = """{"Authorization": "Bearer <token>"}"""
|
||||||
FrontendNode._handle_model_specific_field_values(field, key, name)
|
FrontendNode._handle_model_specific_field_values(field, key, name)
|
||||||
FrontendNode._handle_api_key_specific_field_values(field, key, name)
|
FrontendNode._handle_api_key_specific_field_values(field, key, name)
|
||||||
|
|
||||||
|
|
@ -249,4 +249,4 @@ class FrontendNode(BaseModel):
|
||||||
if "default" in value:
|
if "default" in value:
|
||||||
field.value = value["default"]
|
field.value = value["default"]
|
||||||
if key == "headers":
|
if key == "headers":
|
||||||
field.value = """{'Authorization': 'Bearer <token>'}"""
|
field.value = """{"Authorization": "Bearer <token>"}"""
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ class HeadersDefaultValueFormatter(FieldFormatter):
|
||||||
def format(self, field: TemplateField, name: Optional[str] = None) -> None:
|
def format(self, field: TemplateField, name: Optional[str] = None) -> None:
|
||||||
key = field.name
|
key = field.name
|
||||||
if key == "headers":
|
if key == "headers":
|
||||||
field.value = """{'Authorization': 'Bearer <token>'}"""
|
field.value = """{"Authorization": "Bearer <token>"}"""
|
||||||
|
|
||||||
|
|
||||||
class DictCodeFileFormatter(FieldFormatter):
|
class DictCodeFileFormatter(FieldFormatter):
|
||||||
|
|
|
||||||
|
|
@ -431,7 +431,7 @@ def set_headers_value(value: Dict[str, Any]) -> None:
|
||||||
"""
|
"""
|
||||||
Sets the value for the 'headers' key.
|
Sets the value for the 'headers' key.
|
||||||
"""
|
"""
|
||||||
value["value"] = """{'Authorization': 'Bearer <token>'}"""
|
value["value"] = """{"Authorization": "Bearer <token>"}"""
|
||||||
|
|
||||||
|
|
||||||
def add_options_to_field(
|
def add_options_to_field(
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,12 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
let id;
|
let id;
|
||||||
if (file) {
|
if (file) {
|
||||||
let text = await file.text();
|
let text = await file.text();
|
||||||
|
let fileData = JSON.parse(text);
|
||||||
|
if (fileData.flows) {
|
||||||
|
fileData.flows.forEach((flow: FlowType) => {
|
||||||
|
id = addFlow(flow, newProject);
|
||||||
|
});
|
||||||
|
}
|
||||||
// parse the text into a JSON object
|
// parse the text into a JSON object
|
||||||
let flow: FlowType = JSON.parse(text);
|
let flow: FlowType = JSON.parse(text);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,27 @@
|
||||||
import { expect, test } from "@playwright/test";
|
import { expect, test } from "@playwright/test";
|
||||||
|
|
||||||
test("KeypairListComponent", async ({ page }) => {
|
test("KeypairListComponent", async ({ page }) => {
|
||||||
await page.goto('http://localhost:3000/');
|
await page.goto("http://localhost:3000/");
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.locator('//*[@id="new-project-btn"]').click();
|
await page.locator('//*[@id="new-project-btn"]').click();
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.getByPlaceholder('Search').click();
|
await page.getByPlaceholder("Search").click();
|
||||||
await page.getByPlaceholder('Search').fill('csv');
|
await page.getByPlaceholder("Search").fill("csv");
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.locator('//*[@id="sideCSVLoader"]').dragTo(page.locator('//*[@id="react-flow-id"]'));
|
await page
|
||||||
|
.locator('//*[@id="sideCSVLoader"]')
|
||||||
|
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
await page.mouse.down();
|
await page.mouse.down();
|
||||||
|
|
||||||
await page.locator('//*[@id="keypair0"]').click();
|
await page.locator('//*[@id="keypair0"]').click();
|
||||||
await page.locator('//*[@id="keypair0"]').fill('testtesttesttest');
|
await page.locator('//*[@id="keypair0"]').fill("testtesttesttest");
|
||||||
await page.locator('//*[@id="keypair100"]').click();
|
await page.locator('//*[@id="keypair100"]').click();
|
||||||
await page.locator('//*[@id="keypair100"]').fill('testtesttesttesttesttest');
|
await page.locator('//*[@id="keypair100"]').fill("testtesttesttesttesttest");
|
||||||
|
|
||||||
const plusButtonLocatorNode = page.locator('//*[@id="plusbtn0"]');
|
const plusButtonLocatorNode = page.locator('//*[@id="plusbtn0"]');
|
||||||
const elementCountNode = await plusButtonLocatorNode.count();
|
const elementCountNode = await plusButtonLocatorNode.count();
|
||||||
|
|
@ -28,15 +30,15 @@ test("KeypairListComponent", async ({ page }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.locator('//*[@id="keypair1"]').click();
|
await page.locator('//*[@id="keypair1"]').click();
|
||||||
await page.locator('//*[@id="keypair1"]').fill('testtesttesttest1');
|
await page.locator('//*[@id="keypair1"]').fill("testtesttesttest1");
|
||||||
await page.locator('//*[@id="keypair101"]').click();
|
await page.locator('//*[@id="keypair101"]').click();
|
||||||
await page.locator('//*[@id="keypair101"]').fill('testtesttesttesttesttest1');
|
await page.locator('//*[@id="keypair101"]').fill("testtesttesttesttesttest1");
|
||||||
await page.locator('//*[@id="plusbtn1"]').click();
|
await page.locator('//*[@id="plusbtn1"]').click();
|
||||||
|
|
||||||
await page.locator('//*[@id="keypair2"]').click();
|
await page.locator('//*[@id="keypair2"]').click();
|
||||||
await page.locator('//*[@id="keypair2"]').fill('testtesttesttest2');
|
await page.locator('//*[@id="keypair2"]').fill("testtesttesttest2");
|
||||||
await page.locator('//*[@id="keypair102"]').click();
|
await page.locator('//*[@id="keypair102"]').click();
|
||||||
await page.locator('//*[@id="keypair102"]').fill('testtesttesttesttesttest2');
|
await page.locator('//*[@id="keypair102"]').fill("testtesttesttesttesttest2");
|
||||||
|
|
||||||
await page.locator('//*[@id="minusbtn1"]').click();
|
await page.locator('//*[@id="minusbtn1"]').click();
|
||||||
|
|
||||||
|
|
@ -45,17 +47,22 @@ test("KeypairListComponent", async ({ page }) => {
|
||||||
|
|
||||||
if (elementKeyCount === 0) {
|
if (elementKeyCount === 0) {
|
||||||
expect(true).toBeTruthy();
|
expect(true).toBeTruthy();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
expect(false).toBeTruthy();
|
expect(false).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.locator('//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div').click();
|
await page
|
||||||
|
.locator(
|
||||||
|
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div'
|
||||||
|
)
|
||||||
|
.click();
|
||||||
await page.locator('//*[@id="advancedIcon"]').click();
|
await page.locator('//*[@id="advancedIcon"]').click();
|
||||||
await page.locator('//*[@id="editAdvancedBtn"]').click();
|
await page.locator('//*[@id="editAdvancedBtn"]').click();
|
||||||
|
|
||||||
await page.locator('//*[@id="showfile_path"]').click();
|
await page.locator('//*[@id="showfile_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showfile_path"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showfile_path"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
await page.locator('//*[@id="showmetadata"]').click();
|
await page.locator('//*[@id="showmetadata"]').click();
|
||||||
expect(await page.locator('//*[@id="showmetadata"]').isChecked()).toBeFalsy();
|
expect(await page.locator('//*[@id="showmetadata"]').isChecked()).toBeFalsy();
|
||||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||||
|
|
@ -65,19 +72,29 @@ test("KeypairListComponent", async ({ page }) => {
|
||||||
if (elementCount === 0) {
|
if (elementCount === 0) {
|
||||||
expect(true).toBeTruthy();
|
expect(true).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div').click();
|
await page
|
||||||
|
.locator(
|
||||||
|
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div'
|
||||||
|
)
|
||||||
|
.click();
|
||||||
await page.locator('//*[@id="advancedIcon"]').click();
|
await page.locator('//*[@id="advancedIcon"]').click();
|
||||||
await page.locator('//*[@id="editAdvancedBtn"]').click();
|
await page.locator('//*[@id="editAdvancedBtn"]').click();
|
||||||
|
|
||||||
await page.locator('//*[@id="showfile_path"]').click();
|
await page.locator('//*[@id="showfile_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showfile_path"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showfile_path"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
await page.locator('//*[@id="showmetadata"]').click();
|
await page.locator('//*[@id="showmetadata"]').click();
|
||||||
expect(await page.locator('//*[@id="showmetadata"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmetadata"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="keypair0"]').click();
|
await page.locator('//*[@id="keypair0"]').click();
|
||||||
await page.locator('//*[@id="keypair0"]').fill('testtesttesttest');
|
await page.locator('//*[@id="keypair0"]').fill("testtesttesttest");
|
||||||
await page.locator('//*[@id="keypair100"]').click();
|
await page.locator('//*[@id="keypair100"]').click();
|
||||||
await page.locator('//*[@id="keypair100"]').fill('testtesttesttesttesttest');
|
await page
|
||||||
|
.locator('//*[@id="keypair100"]')
|
||||||
|
.fill("testtesttesttesttesttest");
|
||||||
|
|
||||||
const plusButtonLocator = page.locator('//*[@id="plusbtn0"]');
|
const plusButtonLocator = page.locator('//*[@id="plusbtn0"]');
|
||||||
const elementCount = await plusButtonLocator.count();
|
const elementCount = await plusButtonLocator.count();
|
||||||
|
|
@ -86,15 +103,19 @@ test("KeypairListComponent", async ({ page }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.locator('//*[@id="keypair1"]').click();
|
await page.locator('//*[@id="keypair1"]').click();
|
||||||
await page.locator('//*[@id="keypair1"]').fill('testtesttesttest1');
|
await page.locator('//*[@id="keypair1"]').fill("testtesttesttest1");
|
||||||
await page.locator('//*[@id="keypair101"]').click();
|
await page.locator('//*[@id="keypair101"]').click();
|
||||||
await page.locator('//*[@id="keypair101"]').fill('testtesttesttesttesttest1');
|
await page
|
||||||
|
.locator('//*[@id="keypair101"]')
|
||||||
|
.fill("testtesttesttesttesttest1");
|
||||||
await page.locator('//*[@id="plusbtn1"]').click();
|
await page.locator('//*[@id="plusbtn1"]').click();
|
||||||
|
|
||||||
await page.locator('//*[@id="keypair2"]').click();
|
await page.locator('//*[@id="keypair2"]').click();
|
||||||
await page.locator('//*[@id="keypair2"]').fill('testtesttesttest2');
|
await page.locator('//*[@id="keypair2"]').fill("testtesttesttest2");
|
||||||
await page.locator('//*[@id="keypair102"]').click();
|
await page.locator('//*[@id="keypair102"]').click();
|
||||||
await page.locator('//*[@id="keypair102"]').fill('testtesttesttesttesttest2');
|
await page
|
||||||
|
.locator('//*[@id="keypair102"]')
|
||||||
|
.fill("testtesttesttesttesttest2");
|
||||||
|
|
||||||
await page.locator('//*[@id="minusbtn1"]').click();
|
await page.locator('//*[@id="minusbtn1"]').click();
|
||||||
|
|
||||||
|
|
@ -109,39 +130,44 @@ test("KeypairListComponent", async ({ page }) => {
|
||||||
const key2 = await page.locator('//*[@id="keypair1"]').inputValue();
|
const key2 = await page.locator('//*[@id="keypair1"]').inputValue();
|
||||||
const value2 = await page.locator('//*[@id="keypair101"]').inputValue();
|
const value2 = await page.locator('//*[@id="keypair101"]').inputValue();
|
||||||
|
|
||||||
if (key1 === 'testtesttesttest' && value1 === 'testtesttesttesttesttest' && key2 === 'testtesttesttest2' && value2 === 'testtesttesttesttesttest2') {
|
if (
|
||||||
|
key1 === "testtesttesttest" &&
|
||||||
|
value1 === "testtesttesttesttesttest" &&
|
||||||
|
key2 === "testtesttesttest2" &&
|
||||||
|
value2 === "testtesttesttesttesttest2"
|
||||||
|
) {
|
||||||
expect(true).toBeTruthy();
|
expect(true).toBeTruthy();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
expect(false).toBeTruthy();
|
expect(false).toBeTruthy();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
expect(false).toBeTruthy();
|
expect(false).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
expect(false).toBeTruthy();
|
expect(false).toBeTruthy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test("FloatComponent", async ({ page }) => {
|
test("FloatComponent", async ({ page }) => {
|
||||||
await page.goto('http://localhost:3000/');
|
await page.goto("http://localhost:3000/");
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.locator('//*[@id="new-project-btn"]').click();
|
await page.locator('//*[@id="new-project-btn"]').click();
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.getByPlaceholder('Search').click();
|
await page.getByPlaceholder("Search").click();
|
||||||
await page.getByPlaceholder('Search').fill('llamacpp');
|
await page.getByPlaceholder("Search").fill("llamacpp");
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.locator('//*[@id="sideLlamaCpp"]').dragTo(page.locator('//*[@id="react-flow-id"]'));
|
await page
|
||||||
|
.locator('//*[@id="sideLlamaCpp"]')
|
||||||
|
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
await page.mouse.down();
|
await page.mouse.down();
|
||||||
|
|
||||||
await page.locator('//*[@id="float-input"]').click();
|
await page.locator('//*[@id="float-input"]').click();
|
||||||
await page.locator('//*[@id="float-input"]').fill('3');
|
await page.locator('//*[@id="float-input"]').fill("3");
|
||||||
|
|
||||||
let value = await page.locator('//*[@id="float-input"]').inputValue();
|
let value = await page.locator('//*[@id="float-input"]').inputValue();
|
||||||
|
|
||||||
|
|
@ -150,7 +176,7 @@ test("FloatComponent", async ({ page }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.locator('//*[@id="float-input"]').click();
|
await page.locator('//*[@id="float-input"]').click();
|
||||||
await page.locator('//*[@id="float-input"]').fill('-3');
|
await page.locator('//*[@id="float-input"]').fill("-3");
|
||||||
|
|
||||||
value = await page.locator('//*[@id="float-input"]').inputValue();
|
value = await page.locator('//*[@id="float-input"]').inputValue();
|
||||||
|
|
||||||
|
|
@ -158,8 +184,11 @@ test("FloatComponent", async ({ page }) => {
|
||||||
expect(false).toBeTruthy();
|
expect(false).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await page
|
||||||
await page.locator('//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div').click();
|
.locator(
|
||||||
|
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div'
|
||||||
|
)
|
||||||
|
.click();
|
||||||
await page.locator('//*[@id="editAdvancedIcon"]').click();
|
await page.locator('//*[@id="editAdvancedIcon"]').click();
|
||||||
|
|
||||||
await page.locator('//*[@id="showcache"]').click();
|
await page.locator('//*[@id="showcache"]').click();
|
||||||
|
|
@ -175,43 +204,63 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showgrammar_path
|
// showgrammar_path
|
||||||
await page.locator('//*[@id="showgrammar_path"]').click();
|
await page.locator('//*[@id="showgrammar_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showgrammar_path"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showgrammar_path"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showlast_n_tokens_size
|
// showlast_n_tokens_size
|
||||||
await page.locator('//*[@id="showlast_n_tokens_size"]').click();
|
await page.locator('//*[@id="showlast_n_tokens_size"]').click();
|
||||||
expect(await page.locator('//*[@id="showlast_n_tokens_size"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlast_n_tokens_size"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showlogits_all
|
// showlogits_all
|
||||||
await page.locator('//*[@id="showlogits_all"]').click();
|
await page.locator('//*[@id="showlogits_all"]').click();
|
||||||
expect(await page.locator('//*[@id="showlogits_all"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlogits_all"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showlogprobs
|
// showlogprobs
|
||||||
await page.locator('//*[@id="showlogprobs"]').click();
|
await page.locator('//*[@id="showlogprobs"]').click();
|
||||||
expect(await page.locator('//*[@id="showlogprobs"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlogprobs"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showlora_base
|
// showlora_base
|
||||||
await page.locator('//*[@id="showlora_base"]').click();
|
await page.locator('//*[@id="showlora_base"]').click();
|
||||||
expect(await page.locator('//*[@id="showlora_base"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlora_base"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showlora_path
|
// showlora_path
|
||||||
await page.locator('//*[@id="showlora_path"]').click();
|
await page.locator('//*[@id="showlora_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showlora_path"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlora_path"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showmax_tokens
|
// showmax_tokens
|
||||||
await page.locator('//*[@id="showmax_tokens"]').click();
|
await page.locator('//*[@id="showmax_tokens"]').click();
|
||||||
expect(await page.locator('//*[@id="showmax_tokens"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmax_tokens"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showmetadata
|
// showmetadata
|
||||||
await page.locator('//*[@id="showmetadata"]').click();
|
await page.locator('//*[@id="showmetadata"]').click();
|
||||||
expect(await page.locator('//*[@id="showmetadata"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmetadata"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showmodel_kwargs
|
// showmodel_kwargs
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||||
expect(await page.locator('//*[@id="showmodel_kwargs"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showmodel_path
|
// showmodel_path
|
||||||
await page.locator('//*[@id="showmodel_path"]').click();
|
await page.locator('//*[@id="showmodel_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showmodel_path"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmodel_path"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// shown_batch
|
// shown_batch
|
||||||
await page.locator('//*[@id="shown_batch"]').click();
|
await page.locator('//*[@id="shown_batch"]').click();
|
||||||
|
|
@ -223,7 +272,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// shown_gpu_layers
|
// shown_gpu_layers
|
||||||
await page.locator('//*[@id="shown_gpu_layers"]').click();
|
await page.locator('//*[@id="shown_gpu_layers"]').click();
|
||||||
expect(await page.locator('//*[@id="shown_gpu_layers"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="shown_gpu_layers"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// shown_parts
|
// shown_parts
|
||||||
await page.locator('//*[@id="shown_parts"]').click();
|
await page.locator('//*[@id="shown_parts"]').click();
|
||||||
|
|
@ -231,19 +282,27 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// shown_threads
|
// shown_threads
|
||||||
await page.locator('//*[@id="shown_threads"]').click();
|
await page.locator('//*[@id="shown_threads"]').click();
|
||||||
expect(await page.locator('//*[@id="shown_threads"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="shown_threads"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showrepeat_penalty
|
// showrepeat_penalty
|
||||||
await page.locator('//*[@id="showrepeat_penalty"]').click();
|
await page.locator('//*[@id="showrepeat_penalty"]').click();
|
||||||
expect(await page.locator('//*[@id="showrepeat_penalty"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showrepeat_penalty"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showrope_freq_base
|
// showrope_freq_base
|
||||||
await page.locator('//*[@id="showrope_freq_base"]').click();
|
await page.locator('//*[@id="showrope_freq_base"]').click();
|
||||||
expect(await page.locator('//*[@id="showrope_freq_base"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showrope_freq_base"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showrope_freq_scale
|
// showrope_freq_scale
|
||||||
await page.locator('//*[@id="showrope_freq_scale"]').click();
|
await page.locator('//*[@id="showrope_freq_scale"]').click();
|
||||||
expect(await page.locator('//*[@id="showrope_freq_scale"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showrope_freq_scale"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showseed
|
// showseed
|
||||||
await page.locator('//*[@id="showseed"]').click();
|
await page.locator('//*[@id="showseed"]').click();
|
||||||
|
|
@ -255,7 +314,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showstreaming
|
// showstreaming
|
||||||
await page.locator('//*[@id="showstreaming"]').click();
|
await page.locator('//*[@id="showstreaming"]').click();
|
||||||
expect(await page.locator('//*[@id="showstreaming"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showstreaming"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showsuffix
|
// showsuffix
|
||||||
await page.locator('//*[@id="showsuffix"]').click();
|
await page.locator('//*[@id="showsuffix"]').click();
|
||||||
|
|
@ -267,7 +328,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showtemperature
|
// showtemperature
|
||||||
await page.locator('//*[@id="showtemperature"]').click();
|
await page.locator('//*[@id="showtemperature"]').click();
|
||||||
expect(await page.locator('//*[@id="showtemperature"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showtop_k
|
// showtop_k
|
||||||
await page.locator('//*[@id="showtop_k"]').click();
|
await page.locator('//*[@id="showtop_k"]').click();
|
||||||
|
|
@ -279,11 +342,15 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showuse_mlock
|
// showuse_mlock
|
||||||
await page.locator('//*[@id="showuse_mlock"]').click();
|
await page.locator('//*[@id="showuse_mlock"]').click();
|
||||||
expect(await page.locator('//*[@id="showuse_mlock"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showuse_mlock"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showuse_mmap
|
// showuse_mmap
|
||||||
await page.locator('//*[@id="showuse_mmap"]').click();
|
await page.locator('//*[@id="showuse_mmap"]').click();
|
||||||
expect(await page.locator('//*[@id="showuse_mmap"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showuse_mmap"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// showverbose
|
// showverbose
|
||||||
await page.locator('//*[@id="showverbose"]').click();
|
await page.locator('//*[@id="showverbose"]').click();
|
||||||
|
|
@ -291,9 +358,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showvocab_only
|
// showvocab_only
|
||||||
await page.locator('//*[@id="showvocab_only"]').click();
|
await page.locator('//*[@id="showvocab_only"]').click();
|
||||||
expect(await page.locator('//*[@id="showvocab_only"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showvocab_only"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="showcache"]').click();
|
await page.locator('//*[@id="showcache"]').click();
|
||||||
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeFalsy();
|
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeFalsy();
|
||||||
|
|
@ -308,15 +375,21 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showgrammar_path
|
// showgrammar_path
|
||||||
await page.locator('//*[@id="showgrammar_path"]').click();
|
await page.locator('//*[@id="showgrammar_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showgrammar_path"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showgrammar_path"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showlast_n_tokens_size
|
// showlast_n_tokens_size
|
||||||
await page.locator('//*[@id="showlast_n_tokens_size"]').click();
|
await page.locator('//*[@id="showlast_n_tokens_size"]').click();
|
||||||
expect(await page.locator('//*[@id="showlast_n_tokens_size"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlast_n_tokens_size"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showlogits_all
|
// showlogits_all
|
||||||
await page.locator('//*[@id="showlogits_all"]').click();
|
await page.locator('//*[@id="showlogits_all"]').click();
|
||||||
expect(await page.locator('//*[@id="showlogits_all"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlogits_all"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showlogprobs
|
// showlogprobs
|
||||||
await page.locator('//*[@id="showlogprobs"]').click();
|
await page.locator('//*[@id="showlogprobs"]').click();
|
||||||
|
|
@ -324,15 +397,21 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showlora_base
|
// showlora_base
|
||||||
await page.locator('//*[@id="showlora_base"]').click();
|
await page.locator('//*[@id="showlora_base"]').click();
|
||||||
expect(await page.locator('//*[@id="showlora_base"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlora_base"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showlora_path
|
// showlora_path
|
||||||
await page.locator('//*[@id="showlora_path"]').click();
|
await page.locator('//*[@id="showlora_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showlora_path"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showlora_path"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showmax_tokens
|
// showmax_tokens
|
||||||
await page.locator('//*[@id="showmax_tokens"]').click();
|
await page.locator('//*[@id="showmax_tokens"]').click();
|
||||||
expect(await page.locator('//*[@id="showmax_tokens"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmax_tokens"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showmetadata
|
// showmetadata
|
||||||
await page.locator('//*[@id="showmetadata"]').click();
|
await page.locator('//*[@id="showmetadata"]').click();
|
||||||
|
|
@ -340,11 +419,15 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showmodel_kwargs
|
// showmodel_kwargs
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||||
expect(await page.locator('//*[@id="showmodel_kwargs"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showmodel_path
|
// showmodel_path
|
||||||
await page.locator('//*[@id="showmodel_path"]').click();
|
await page.locator('//*[@id="showmodel_path"]').click();
|
||||||
expect(await page.locator('//*[@id="showmodel_path"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showmodel_path"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
// shown_batch
|
// shown_batch
|
||||||
await page.locator('//*[@id="shown_batch"]').click();
|
await page.locator('//*[@id="shown_batch"]').click();
|
||||||
|
|
@ -356,7 +439,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// shown_gpu_layers
|
// shown_gpu_layers
|
||||||
await page.locator('//*[@id="shown_gpu_layers"]').click();
|
await page.locator('//*[@id="shown_gpu_layers"]').click();
|
||||||
expect(await page.locator('//*[@id="shown_gpu_layers"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="shown_gpu_layers"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// shown_parts
|
// shown_parts
|
||||||
await page.locator('//*[@id="shown_parts"]').click();
|
await page.locator('//*[@id="shown_parts"]').click();
|
||||||
|
|
@ -364,19 +449,27 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// shown_threads
|
// shown_threads
|
||||||
await page.locator('//*[@id="shown_threads"]').click();
|
await page.locator('//*[@id="shown_threads"]').click();
|
||||||
expect(await page.locator('//*[@id="shown_threads"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="shown_threads"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showrepeat_penalty
|
// showrepeat_penalty
|
||||||
await page.locator('//*[@id="showrepeat_penalty"]').click();
|
await page.locator('//*[@id="showrepeat_penalty"]').click();
|
||||||
expect(await page.locator('//*[@id="showrepeat_penalty"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showrepeat_penalty"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showrope_freq_base
|
// showrope_freq_base
|
||||||
await page.locator('//*[@id="showrope_freq_base"]').click();
|
await page.locator('//*[@id="showrope_freq_base"]').click();
|
||||||
expect(await page.locator('//*[@id="showrope_freq_base"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showrope_freq_base"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showrope_freq_scale
|
// showrope_freq_scale
|
||||||
await page.locator('//*[@id="showrope_freq_scale"]').click();
|
await page.locator('//*[@id="showrope_freq_scale"]').click();
|
||||||
expect(await page.locator('//*[@id="showrope_freq_scale"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showrope_freq_scale"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showseed
|
// showseed
|
||||||
await page.locator('//*[@id="showseed"]').click();
|
await page.locator('//*[@id="showseed"]').click();
|
||||||
|
|
@ -388,7 +481,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showstreaming
|
// showstreaming
|
||||||
await page.locator('//*[@id="showstreaming"]').click();
|
await page.locator('//*[@id="showstreaming"]').click();
|
||||||
expect(await page.locator('//*[@id="showstreaming"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showstreaming"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showsuffix
|
// showsuffix
|
||||||
await page.locator('//*[@id="showsuffix"]').click();
|
await page.locator('//*[@id="showsuffix"]').click();
|
||||||
|
|
@ -408,7 +503,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showuse_mlock
|
// showuse_mlock
|
||||||
await page.locator('//*[@id="showuse_mlock"]').click();
|
await page.locator('//*[@id="showuse_mlock"]').click();
|
||||||
expect(await page.locator('//*[@id="showuse_mlock"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showuse_mlock"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
// showuse_mmap
|
// showuse_mmap
|
||||||
await page.locator('//*[@id="showuse_mmap"]').click();
|
await page.locator('//*[@id="showuse_mmap"]').click();
|
||||||
|
|
@ -420,8 +517,9 @@ test("FloatComponent", async ({ page }) => {
|
||||||
|
|
||||||
// showvocab_only
|
// showvocab_only
|
||||||
await page.locator('//*[@id="showvocab_only"]').click();
|
await page.locator('//*[@id="showvocab_only"]').click();
|
||||||
expect(await page.locator('//*[@id="showvocab_only"]').isChecked()).toBeFalsy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showvocab_only"]').isChecked()
|
||||||
|
).toBeFalsy();
|
||||||
|
|
||||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||||
|
|
||||||
|
|
@ -430,16 +528,22 @@ test("FloatComponent", async ({ page }) => {
|
||||||
if (elementCount === 0) {
|
if (elementCount === 0) {
|
||||||
expect(true).toBeTruthy();
|
expect(true).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div').click();
|
await page
|
||||||
|
.locator(
|
||||||
|
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div'
|
||||||
|
)
|
||||||
|
.click();
|
||||||
await page.locator('//*[@id="editAdvancedIcon"]').click();
|
await page.locator('//*[@id="editAdvancedIcon"]').click();
|
||||||
|
|
||||||
// showtemperature
|
// showtemperature
|
||||||
await page.locator('//*[@id="showtemperature"]').click();
|
await page.locator('//*[@id="showtemperature"]').click();
|
||||||
expect(await page.locator('//*[@id="showtemperature"]').isChecked()).toBeTruthy();
|
expect(
|
||||||
|
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||||
|
).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||||
await page.locator('//*[@id="float-input"]').click();
|
await page.locator('//*[@id="float-input"]').click();
|
||||||
await page.locator('//*[@id="float-input"]').fill('3');
|
await page.locator('//*[@id="float-input"]').fill("3");
|
||||||
|
|
||||||
let value = await page.locator('//*[@id="float-input"]').inputValue();
|
let value = await page.locator('//*[@id="float-input"]').inputValue();
|
||||||
|
|
||||||
|
|
@ -448,7 +552,7 @@ test("FloatComponent", async ({ page }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.locator('//*[@id="float-input"]').click();
|
await page.locator('//*[@id="float-input"]').click();
|
||||||
await page.locator('//*[@id="float-input"]').fill('-3');
|
await page.locator('//*[@id="float-input"]').fill("-3");
|
||||||
|
|
||||||
value = await page.locator('//*[@id="float-input"]').inputValue();
|
value = await page.locator('//*[@id="float-input"]').inputValue();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue