MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / callCompletion

Function callCompletion

cmd/commit.go:85–100  ·  view source on GitHub ↗
(
	ctx context.Context,
	client core.Generative,
	content string,
	w io.Writer,
)

Source from the content-addressed store, hash-verified

83}
84
85func callCompletion(
86 ctx context.Context,
87 client core.Generative,
88 content string,
89 w io.Writer,
90) (*core.Response, error) {
91 if viper.GetBool("openai.stream") {
92 resp, err := client.CompletionStream(ctx, content, w)
93 if err != nil {
94 return nil, err
95 }
96 fmt.Fprintln(w)
97 return resp, nil
98 }
99 return client.Completion(ctx, content)
100}
101
102// commitCmd represents the commit command.
103var commitCmd = &cobra.Command{

Callers 2

review.goFile · 0.85
commit.goFile · 0.85

Calls 2

CompletionStreamMethod · 0.65
CompletionMethod · 0.65

Tested by

no test coverage detected