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

Initial project setup for llamacpp bindings #267

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

nnance
Copy link
Contributor

@nnance nnance commented Jan 24, 2024

You can build and test the bindings by running the test script. The provider isn't integrated with the bindings yet but I wanted to get feedback on project and build setup.

.gitignore Show resolved Hide resolved
assert.doesNotThrow(testBasic, "testBasic threw an expection");
assert.throws(testInvalidParams, "testInvalidParams didn't throw");

console.log("Tests passed- everything looks OK!");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using vitest for testing. Here is a small example from one of the other tests:

import assert from "node:assert";
import { test, describe } from "vitest";
import { fixJson } from "./fixJson.js";

test("should handle empty input", () => {
  assert.strictEqual(fixJson(""), "");
});

Ideally we'd use the same testing lib and patterns everywhere (if this is intended to be an automated test).

@@ -0,0 +1,19 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to put helper scripts into the bin subfolder, e.g. packages/@modelfusion-llamacpp-bindings/bin/update_submodules.sh would follow that convention here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants