Skip to content

Commit 12c8ff6

Browse files
committed
docs: fix typos
Found via `codespell -S gallery,assets,go.sum,CMakeLists.txt -L nd,ofthe,andthe,bu` and `typos --hidden --format brief` Signed-off-by: Kian-Meng Ang <[email protected]>
1 parent dbc2bb5 commit 12c8ff6

File tree

20 files changed

+29
-29
lines changed

20 files changed

+29
-29
lines changed

backend/go/huggingface/langchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
// This is a wrapper to statisfy the GRPC service interface
3+
// This is a wrapper to satisfy the GRPC service interface
44
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
55
import (
66
"fmt"

backend/go/llm/llama/llama.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
// This is a wrapper to statisfy the GRPC service interface
3+
// This is a wrapper to satisfy the GRPC service interface
44
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
55
import (
66
"fmt"
@@ -79,7 +79,7 @@ func (llm *LLM) Load(opts *pb.ModelOptions) error {
7979
}
8080

8181
if opts.LowVRAM {
82-
llamaOpts = append(llamaOpts, llama.EnabelLowVRAM)
82+
llamaOpts = append(llamaOpts, llama.EnableLowVRAM)
8383
}
8484

8585
if opts.DraftModel != "" {

backend/go/local-store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
// This is a wrapper to statisfy the GRPC service interface
3+
// This is a wrapper to satisfy the GRPC service interface
44
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
55
import (
66
"container/heap"

backend/go/piper/piper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
// This is a wrapper to statisfy the GRPC service interface
3+
// This is a wrapper to satisfy the GRPC service interface
44
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
55
import (
66
"fmt"

backend/go/silero-vad/vad.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
// This is a wrapper to statisfy the GRPC service interface
3+
// This is a wrapper to satisfy the GRPC service interface
44
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
55
import (
66
"fmt"

backend/go/whisper/gowhisper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (w *Whisper) VAD(req *pb.VADRequest) (pb.VADResponse, error) {
7272
}, nil
7373
}
7474

75-
// unsafeptr warning is caused by segsPtr being on the stack and therefor being subject to stack copying AFAICT
75+
// unsafeptr warning is caused by segsPtr being on the stack and therefore being subject to stack copying AFAICT
7676
// however the stack shouldn't have grown between setting segsPtr and now, also the memory pointed to is allocated by C++
7777
segs := unsafe.Slice((*float32)(unsafe.Pointer(segsPtr)), segsLen)
7878

core/cli/federated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type FederatedCLI struct {
1212
Address string `env:"LOCALAI_ADDRESS,ADDRESS" default:":8080" help:"Bind address for the API server" group:"api"`
1313
Peer2PeerToken string `env:"LOCALAI_P2P_TOKEN,P2P_TOKEN,TOKEN" name:"p2ptoken" help:"Token for P2P mode (optional)" group:"p2p"`
1414
RandomWorker bool `env:"LOCALAI_RANDOM_WORKER,RANDOM_WORKER" default:"false" help:"Select a random worker from the pool" group:"p2p"`
15-
Peer2PeerNetworkID string `env:"LOCALAI_P2P_NETWORK_ID,P2P_NETWORK_ID" help:"Network ID for P2P mode, can be set arbitrarly by the user for grouping a set of instances." group:"p2p"`
15+
Peer2PeerNetworkID string `env:"LOCALAI_P2P_NETWORK_ID,P2P_NETWORK_ID" help:"Network ID for P2P mode, can be set arbitrarily by the user for grouping a set of instances." group:"p2p"`
1616
TargetWorker string `env:"LOCALAI_TARGET_WORKER,TARGET_WORKER" help:"Target worker to run the federated server on" group:"p2p"`
1717
}
1818

core/cli/run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ type RunCMD struct {
5454
DisableWebUI bool `env:"LOCALAI_DISABLE_WEBUI,DISABLE_WEBUI" default:"false" help:"Disables the web user interface. When set to true, the server will only expose API endpoints without serving the web interface" group:"api"`
5555
DisablePredownloadScan bool `env:"LOCALAI_DISABLE_PREDOWNLOAD_SCAN" help:"If true, disables the best-effort security scanner before downloading any files." group:"hardening" default:"false"`
5656
OpaqueErrors bool `env:"LOCALAI_OPAQUE_ERRORS" default:"false" help:"If true, all error responses are replaced with blank 500 errors. This is intended only for hardening against information leaks and is normally not recommended." group:"hardening"`
57-
UseSubtleKeyComparison bool `env:"LOCALAI_SUBTLE_KEY_COMPARISON" default:"false" help:"If true, API Key validation comparisons will be performed using constant-time comparisons rather than simple equality. This trades off performance on each request for resiliancy against timing attacks." group:"hardening"`
57+
UseSubtleKeyComparison bool `env:"LOCALAI_SUBTLE_KEY_COMPARISON" default:"false" help:"If true, API Key validation comparisons will be performed using constant-time comparisons rather than simple equality. This trades off performance on each request for resiliency against timing attacks." group:"hardening"`
5858
DisableApiKeyRequirementForHttpGet bool `env:"LOCALAI_DISABLE_API_KEY_REQUIREMENT_FOR_HTTP_GET" default:"false" help:"If true, a valid API key is not required to issue GET requests to portions of the web ui. This should only be enabled in secure testing environments" group:"hardening"`
5959
DisableMetricsEndpoint bool `env:"LOCALAI_DISABLE_METRICS_ENDPOINT,DISABLE_METRICS_ENDPOINT" default:"false" help:"Disable the /metrics endpoint" group:"api"`
60-
HttpGetExemptedEndpoints []string `env:"LOCALAI_HTTP_GET_EXEMPTED_ENDPOINTS" default:"^/$,^/browse/?$,^/talk/?$,^/p2p/?$,^/chat/?$,^/text2image/?$,^/tts/?$,^/static/.*$,^/swagger.*$" help:"If LOCALAI_DISABLE_API_KEY_REQUIREMENT_FOR_HTTP_GET is overriden to true, this is the list of endpoints to exempt. Only adjust this in case of a security incident or as a result of a personal security posture review" group:"hardening"`
60+
HttpGetExemptedEndpoints []string `env:"LOCALAI_HTTP_GET_EXEMPTED_ENDPOINTS" default:"^/$,^/browse/?$,^/talk/?$,^/p2p/?$,^/chat/?$,^/text2image/?$,^/tts/?$,^/static/.*$,^/swagger.*$" help:"If LOCALAI_DISABLE_API_KEY_REQUIREMENT_FOR_HTTP_GET is overridden to true, this is the list of endpoints to exempt. Only adjust this in case of a security incident or as a result of a personal security posture review" group:"hardening"`
6161
Peer2Peer bool `env:"LOCALAI_P2P,P2P" name:"p2p" default:"false" help:"Enable P2P mode" group:"p2p"`
6262
Peer2PeerDHTInterval int `env:"LOCALAI_P2P_DHT_INTERVAL,P2P_DHT_INTERVAL" default:"360" name:"p2p-dht-interval" help:"Interval for DHT refresh (used during token generation)" group:"p2p"`
6363
Peer2PeerOTPInterval int `env:"LOCALAI_P2P_OTP_INTERVAL,P2P_OTP_INTERVAL" default:"9000" name:"p2p-otp-interval" help:"Interval for OTP refresh (used during token generation)" group:"p2p"`
6464
Peer2PeerToken string `env:"LOCALAI_P2P_TOKEN,P2P_TOKEN,TOKEN" name:"p2ptoken" help:"Token for P2P mode (optional)" group:"p2p"`
65-
Peer2PeerNetworkID string `env:"LOCALAI_P2P_NETWORK_ID,P2P_NETWORK_ID" help:"Network ID for P2P mode, can be set arbitrarly by the user for grouping a set of instances" group:"p2p"`
65+
Peer2PeerNetworkID string `env:"LOCALAI_P2P_NETWORK_ID,P2P_NETWORK_ID" help:"Network ID for P2P mode, can be set arbitrarily by the user for grouping a set of instances" group:"p2p"`
6666
ParallelRequests bool `env:"LOCALAI_PARALLEL_REQUESTS,PARALLEL_REQUESTS" help:"Enable backends to handle multiple requests in parallel if they support it (e.g.: llama.cpp or vllm)" group:"backends"`
6767
SingleActiveBackend bool `env:"LOCALAI_SINGLE_ACTIVE_BACKEND,SINGLE_ACTIVE_BACKEND" help:"Allow only one backend to be run at a time" group:"backends"`
6868
PreloadBackendOnly bool `env:"LOCALAI_PRELOAD_BACKEND_ONLY,PRELOAD_BACKEND_ONLY" default:"false" help:"Do not launch the API services, only the preloaded models / backends are started (useful for multi-node setups)" group:"backends"`

core/cli/worker/worker_p2p.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type P2P struct {
2222
NoRunner bool `env:"LOCALAI_NO_RUNNER,NO_RUNNER" help:"Do not start the llama-cpp-rpc-server"`
2323
RunnerAddress string `env:"LOCALAI_RUNNER_ADDRESS,RUNNER_ADDRESS" help:"Address of the llama-cpp-rpc-server"`
2424
RunnerPort string `env:"LOCALAI_RUNNER_PORT,RUNNER_PORT" help:"Port of the llama-cpp-rpc-server"`
25-
Peer2PeerNetworkID string `env:"LOCALAI_P2P_NETWORK_ID,P2P_NETWORK_ID" help:"Network ID for P2P mode, can be set arbitrarly by the user for grouping a set of instances" group:"p2p"`
25+
Peer2PeerNetworkID string `env:"LOCALAI_P2P_NETWORK_ID,P2P_NETWORK_ID" help:"Network ID for P2P mode, can be set arbitrarily by the user for grouping a set of instances" group:"p2p"`
2626
}
2727

2828
func (r *P2P) Run(ctx *cliContext.Context) error {

core/http/app_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func getModelStatus(url string) (response map[string]interface{}) {
7575
// Unmarshal the response into a map[string]interface{}
7676
err = json.Unmarshal(body, &response)
7777
if err != nil {
78-
fmt.Println("Error unmarshaling JSON response:", err)
78+
fmt.Println("Error unmarshalling JSON response:", err)
7979
return
8080
}
8181
return
@@ -131,7 +131,7 @@ func postModelApplyRequest(url string, request modelApplyRequest) (response map[
131131
// Unmarshal the response into a map[string]interface{}
132132
err = json.Unmarshal(body, &response)
133133
if err != nil {
134-
fmt.Println("Error unmarshaling JSON response:", err)
134+
fmt.Println("Error unmarshalling JSON response:", err)
135135
return
136136
}
137137
return
@@ -629,7 +629,7 @@ var _ = Describe("API test", func() {
629629
},
630630
"unit": {
631631
Type: jsonschema.String,
632-
Enum: []string{"celcius", "fahrenheit"},
632+
Enum: []string{"celsius", "fahrenheit"},
633633
},
634634
},
635635
Required: []string{"location"},
@@ -646,7 +646,7 @@ var _ = Describe("API test", func() {
646646
err = json.Unmarshal([]byte(resp2.Choices[0].Message.FunctionCall.Arguments), &res)
647647
Expect(err).ToNot(HaveOccurred())
648648
Expect(res["location"]).To(ContainSubstring("San Francisco"), fmt.Sprint(res))
649-
Expect(res["unit"]).To(Equal("celcius"), fmt.Sprint(res))
649+
Expect(res["unit"]).To(Equal("celsius"), fmt.Sprint(res))
650650
Expect(string(resp2.Choices[0].FinishReason)).To(Equal("function_call"), fmt.Sprint(resp2.Choices[0].FinishReason))
651651
})
652652

0 commit comments

Comments
 (0)