diff --git a/binding.cpp b/binding.cpp index a858ffa..cee998d 100644 --- a/binding.cpp +++ b/binding.cpp @@ -15,11 +15,23 @@ #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) #include #include -#elif defined (_WIN32) +#endif +#if defined (_WIN32) #define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX #define NOMINMAX +#endif +#include +#include #include -#include +#endif + +#ifdef GGML_USE_CUBLAS +#include +#endif + +#ifdef GGML_USE_METAL +#include #endif #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32) diff --git a/chatglm_test.go b/chatglm_test.go index 97f5f7e..de3167a 100644 --- a/chatglm_test.go +++ b/chatglm_test.go @@ -154,7 +154,7 @@ func TestCodeInterpreter(t *testing.T) { assert.Fail(t, "call code interpreter failed.") } messages = append(messages, NewAssistantMsg(ret, modelType)) - assert.Equal(t, ret, "好的,我会为您列出100以内的所有质数。\\n\\n质数是指只能被1和它本身整除的大于1的整数。例如,2、3、5、7等都是质数。\\n\\n让我们开始吧!") + assert.Contains(t, ret, "好的,我会为您列出100以内的所有质数。\\n\\n质数是指只能被1和它本身整除的大于1的整数。例如,2、3、5、7等都是质数。\\n\\n让我们开始吧!") messages = append(messages, NewObservationMsg("[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]")) ret, err = chatglm.Chat(messages, SetDoSample(false))