2023-06-15 14:58:03 -04:00
|
|
|
|
using Xunit;
|
2023-05-22 19:18:04 -04:00
|
|
|
|
|
|
|
|
|
namespace Gpt4All.Tests;
|
|
|
|
|
|
|
|
|
|
public class ModelFactoryTests
|
|
|
|
|
{
|
|
|
|
|
private readonly Gpt4AllModelFactory _modelFactory;
|
|
|
|
|
|
|
|
|
|
public ModelFactoryTests()
|
|
|
|
|
{
|
|
|
|
|
_modelFactory = new Gpt4AllModelFactory();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
2023-06-15 14:58:03 -04:00
|
|
|
|
[Trait(Traits.SkipOnCI, "True")]
|
2023-05-22 19:18:04 -04:00
|
|
|
|
public void CanLoadLlamaModel()
|
|
|
|
|
{
|
2023-06-13 08:05:34 -04:00
|
|
|
|
using var model = _modelFactory.LoadModel(Constants.LLAMA_MODEL_PATH);
|
2023-05-22 19:18:04 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
2023-06-15 14:58:03 -04:00
|
|
|
|
[Trait(Traits.SkipOnCI, "True")]
|
2023-05-22 19:18:04 -04:00
|
|
|
|
public void CanLoadGptjModel()
|
|
|
|
|
{
|
2023-06-13 08:05:34 -04:00
|
|
|
|
using var model = _modelFactory.LoadModel(Constants.GPTJ_MODEL_PATH);
|
2023-05-22 19:18:04 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
2023-06-15 14:58:03 -04:00
|
|
|
|
[Trait(Traits.SkipOnCI, "True")]
|
2023-05-22 19:18:04 -04:00
|
|
|
|
public void CanLoadMptModel()
|
|
|
|
|
{
|
2023-06-13 08:05:34 -04:00
|
|
|
|
using var model = _modelFactory.LoadModel(Constants.MPT_MODEL_PATH);
|
2023-05-22 19:18:04 -04:00
|
|
|
|
}
|
|
|
|
|
}
|