mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
fix(seed): generate random seed per-request if -1 is set (#1952)
* fix(seed): generate random seed per-request if -1 is set Also update ci with new workflows and allow the aio tests to run with an api key Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * docs(openvino): Add OpenVINO example Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
93cfec3c32
commit
ff77d3bc22
7 changed files with 110 additions and 7 deletions
|
@ -23,6 +23,7 @@ var containerImageTag = os.Getenv("LOCALAI_IMAGE_TAG")
|
|||
var modelsDir = os.Getenv("LOCALAI_MODELS_DIR")
|
||||
var apiPort = os.Getenv("LOCALAI_API_PORT")
|
||||
var apiEndpoint = os.Getenv("LOCALAI_API_ENDPOINT")
|
||||
var apiKey = os.Getenv("LOCALAI_API_KEY")
|
||||
|
||||
func TestLocalAI(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
|
@ -38,11 +39,11 @@ var _ = BeforeSuite(func() {
|
|||
var defaultConfig openai.ClientConfig
|
||||
if apiEndpoint == "" {
|
||||
startDockerImage()
|
||||
defaultConfig = openai.DefaultConfig("")
|
||||
defaultConfig = openai.DefaultConfig(apiKey)
|
||||
defaultConfig.BaseURL = "http://localhost:" + apiPort + "/v1"
|
||||
} else {
|
||||
fmt.Println("Default ", apiEndpoint)
|
||||
defaultConfig = openai.DefaultConfig("")
|
||||
defaultConfig = openai.DefaultConfig(apiKey)
|
||||
defaultConfig.BaseURL = apiEndpoint
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue