mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
OpenAI: Add Suffix to v1/completions (#5611)
* add suffix * remove todo * remove TODO * add to test * rm outdated prompt tokens info md * fix test * fix test
This commit is contained in:
@@ -85,6 +85,7 @@ func TestMiddlewareRequests(t *testing.T) {
|
||||
Prompt: "Hello",
|
||||
Temperature: &temp,
|
||||
Stop: []string{"\n", "stop"},
|
||||
Suffix: "suffix",
|
||||
}
|
||||
|
||||
bodyBytes, _ := json.Marshal(body)
|
||||
@@ -115,6 +116,10 @@ func TestMiddlewareRequests(t *testing.T) {
|
||||
if stopTokens[0] != "\n" || stopTokens[1] != "stop" {
|
||||
t.Fatalf("expected ['\\n', 'stop'], got %v", stopTokens)
|
||||
}
|
||||
|
||||
if genReq.Suffix != "suffix" {
|
||||
t.Fatalf("expected 'suffix', got %s", genReq.Suffix)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user