-
Notifications
You must be signed in to change notification settings - Fork 82
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
base: main
Are you sure you want to change the base?
Conversation
packages/@modelfusion-llamacpp-bindings/src/LlamaCppBindingsCompletionModel.ts
Outdated
Show resolved
Hide resolved
packages/@modelfusion-llamacpp-bindings/src/LlamaCppBindingsCompletionModel.ts
Outdated
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!"); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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.