mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-06 09:20:33 +00:00
797891c995
* Initial Library Loader * Load library as part of Model factory * Dynamically search and find the dlls * Update tests to use locally built runtimes * Fix dylib loading, add macos runtime support for sample/tests * Bypass automatic loading by default. * Only set CMAKE_OSX_ARCHITECTURES if not already set, allow cross-compile * Switch Loading again * Update build scripts for mac/linux * Update bindings to support newest breaking changes * Fix build * Use llmodel for Windows * Actually, it does need to be libllmodel * Name * Remove TFMs, bypass loading by default * Fix script * Delete mac script --------- Co-authored-by: Tim Miller <innerlogic4321@ghmail.com>
32 lines
668 B
C#
32 lines
668 B
C#
using Xunit;
|
|
|
|
namespace Gpt4All.Tests;
|
|
|
|
public class ModelFactoryTests
|
|
{
|
|
private readonly Gpt4AllModelFactory _modelFactory;
|
|
|
|
public ModelFactoryTests()
|
|
{
|
|
_modelFactory = new Gpt4AllModelFactory();
|
|
}
|
|
|
|
[Fact]
|
|
public void CanLoadLlamaModel()
|
|
{
|
|
using var model = _modelFactory.LoadModel(Constants.LLAMA_MODEL_PATH);
|
|
}
|
|
|
|
[Fact]
|
|
public void CanLoadGptjModel()
|
|
{
|
|
using var model = _modelFactory.LoadModel(Constants.GPTJ_MODEL_PATH);
|
|
}
|
|
|
|
[Fact]
|
|
public void CanLoadMptModel()
|
|
{
|
|
using var model = _modelFactory.LoadModel(Constants.MPT_MODEL_PATH);
|
|
}
|
|
}
|