File tree Expand file tree Collapse file tree 7 files changed +43
-9
lines changed Expand file tree Collapse file tree 7 files changed +43
-9
lines changed Original file line number Diff line number Diff line change 11//go:build wireinject
2- // +build wireinject
32
43package main
54
Original file line number Diff line number Diff line change 11//go:build wireinject
2- // +build wireinject
32
43package main
54
Original file line number Diff line number Diff line change 11//go:build wireinject
2- // +build wireinject
32
43package main
54
Original file line number Diff line number Diff line change @@ -6361,6 +6361,9 @@ const docTemplate = `{
63616361 }
63626362 }
63636363 },
6364+ "domain.MessageContent": {
6365+ "type": "object"
6366+ },
63646367 "domain.MessageFrom": {
63656368 "type": "integer",
63666369 "enum": [
@@ -6762,6 +6765,9 @@ const docTemplate = `{
67626765 "stream": {
67636766 "type": "boolean"
67646767 },
6768+ "stream_options": {
6769+ "$ref": "#/definitions/domain.OpenAIStreamOptions"
6770+ },
67656771 "temperature": {
67666772 "type": "number"
67676773 },
@@ -6884,7 +6890,7 @@ const docTemplate = `{
68846890 ],
68856891 "properties": {
68866892 "content": {
6887- "type ": "string "
6893+ "$ref ": "#/definitions/domain.MessageContent "
68886894 },
68896895 "name": {
68906896 "type": "string"
@@ -6914,6 +6920,14 @@ const docTemplate = `{
69146920 }
69156921 }
69166922 },
6923+ "domain.OpenAIStreamOptions": {
6924+ "type": "object",
6925+ "properties": {
6926+ "include_usage": {
6927+ "type": "boolean"
6928+ }
6929+ }
6930+ },
69176931 "domain.OpenAITool": {
69186932 "type": "object",
69196933 "required": [
Original file line number Diff line number Diff line change 63546354 }
63556355 }
63566356 },
6357+ "domain.MessageContent" : {
6358+ "type" : " object"
6359+ },
63576360 "domain.MessageFrom" : {
63586361 "type" : " integer" ,
63596362 "enum" : [
67556758 "stream" : {
67566759 "type" : " boolean"
67576760 },
6761+ "stream_options" : {
6762+ "$ref" : " #/definitions/domain.OpenAIStreamOptions"
6763+ },
67586764 "temperature" : {
67596765 "type" : " number"
67606766 },
68776883 ],
68786884 "properties" : {
68796885 "content" : {
6880- "type " : " string "
6886+ "$ref " : " #/definitions/domain.MessageContent "
68816887 },
68826888 "name" : {
68836889 "type" : " string"
69076913 }
69086914 }
69096915 },
6916+ "domain.OpenAIStreamOptions" : {
6917+ "type" : " object" ,
6918+ "properties" : {
6919+ "include_usage" : {
6920+ "type" : " boolean"
6921+ }
6922+ }
6923+ },
69106924 "domain.OpenAITool" : {
69116925 "type" : " object" ,
69126926 "required" : [
Original file line number Diff line number Diff line change @@ -1614,6 +1614,8 @@ definitions:
16141614 url :
16151615 type : string
16161616 type : object
1617+ domain.MessageContent :
1618+ type : object
16171619 domain.MessageFrom :
16181620 enum :
16191621 - 1
@@ -1875,6 +1877,8 @@ definitions:
18751877 type : array
18761878 stream :
18771879 type : boolean
1880+ stream_options :
1881+ $ref : ' #/definitions/domain.OpenAIStreamOptions'
18781882 temperature :
18791883 type : number
18801884 tool_choice :
@@ -1956,7 +1960,7 @@ definitions:
19561960 domain.OpenAIMessage :
19571961 properties :
19581962 content :
1959- type : string
1963+ $ref : ' #/definitions/domain.MessageContent '
19601964 name :
19611965 type : string
19621966 role :
@@ -1977,6 +1981,11 @@ definitions:
19771981 required :
19781982 - type
19791983 type : object
1984+ domain.OpenAIStreamOptions :
1985+ properties :
1986+ include_usage :
1987+ type : boolean
1988+ type : object
19801989 domain.OpenAITool :
19811990 properties :
19821991 function :
Original file line number Diff line number Diff line change @@ -181,9 +181,9 @@ type OpenAIStreamResponse struct {
181181}
182182
183183type OpenAIStreamChoice struct {
184- Index int `json:"index"`
185- Delta OpenAIMessage `json:"delta"`
186- FinishReason * string `json:"finish_reason,omitempty"`
184+ Index int `json:"index"`
185+ Delta OpenAIMessage `json:"delta"`
186+ FinishReason * string `json:"finish_reason,omitempty"`
187187}
188188
189189// OpenAI 错误响应结构体
You can’t perform that action at this time.
0 commit comments