Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz committed Dec 23, 2024
1 parent daeedf0 commit 690fbc5
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/waveai/openaibackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,6 @@ func convertPrompt(prompt []wshrpc.WaveAIPromptMessageType) []openaiapi.ChatComp
return rtn
}

func convertUsage(resp openaiapi.ChatCompletionResponse) *wshrpc.WaveAIUsageType {
if resp.Usage.TotalTokens == 0 {
return nil
}
return &wshrpc.WaveAIUsageType{
PromptTokens: resp.Usage.PromptTokens,
CompletionTokens: resp.Usage.CompletionTokens,
TotalTokens: resp.Usage.TotalTokens,
}
}

func (OpenAIBackend) StreamCompletion(ctx context.Context, request wshrpc.WaveAIStreamRequest) chan wshrpc.RespOrErrorUnion[wshrpc.WaveAIPacketType] {
rtn := make(chan wshrpc.RespOrErrorUnion[wshrpc.WaveAIPacketType])
go func() {
Expand Down

0 comments on commit 690fbc5

Please sign in to comment.