Initial project setup for llamacpp bindings#267
Draft
nnance wants to merge 20 commits intovercel:mainfrom
Draft
Conversation
lgrammel
reviewed
Jan 24, 2024
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!"); No newline at end of file |
Collaborator
There was a problem hiding this comment.
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 | |||
Collaborator
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.