1
1
package io .cequence .openaiscala .domain .responsesapi
2
2
3
3
import io .cequence .openaiscala .domain .ChatRole
4
+ import io .cequence .openaiscala .domain .responsesapi .tools ._
4
5
5
6
trait Input
6
7
7
- // shortcuts for creating Inputs
8
8
object Input {
9
9
10
10
def ofInputTextMessage (
@@ -44,16 +44,16 @@ object Input {
44
44
id : String ,
45
45
queries : Seq [String ] = Nil ,
46
46
status : ModelStatus ,
47
- results : Seq [tools. FileSearchResult ] = Nil
48
- ) = tools. FileSearchToolCall (id, queries, status, results)
47
+ results : Seq [FileSearchResult ] = Nil
48
+ ) = FileSearchToolCall (id, queries, status, results)
49
49
50
50
def ofComputerToolCall (
51
- action : tools. ComputerToolAction ,
51
+ action : ComputerToolAction ,
52
52
callId : String ,
53
53
id : String ,
54
- pendingSafetyChecks : Seq [tools. PendingSafetyCheck ] = Nil ,
54
+ pendingSafetyChecks : Seq [PendingSafetyCheck ] = Nil ,
55
55
status : ModelStatus
56
- ) = tools. ComputerToolCall (
56
+ ) = ComputerToolCall (
57
57
action,
58
58
callId,
59
59
id,
@@ -63,11 +63,11 @@ object Input {
63
63
64
64
def ofComputerToolCallOutput (
65
65
callId : String ,
66
- output : tools. ComputerScreenshot ,
67
- acknowledgedSafetyChecks : Seq [tools. AcknowledgedSafetyCheck ] = Nil ,
66
+ output : ComputerScreenshot ,
67
+ acknowledgedSafetyChecks : Seq [AcknowledgedSafetyCheck ] = Nil ,
68
68
id : Option [String ] = None ,
69
69
status : Option [ModelStatus ] = None
70
- ) = tools. ComputerToolCallOutput (
70
+ ) = ComputerToolCallOutput (
71
71
callId,
72
72
output,
73
73
acknowledgedSafetyChecks,
@@ -78,22 +78,33 @@ object Input {
78
78
def ofWebSearchToolCall (
79
79
id : String ,
80
80
status : ModelStatus
81
- ) = tools. WebSearchToolCall (id, status)
81
+ ) = WebSearchToolCall (id, status)
82
82
83
83
def ofFunctionToolCall (
84
84
arguments : String ,
85
85
callId : String ,
86
86
name : String ,
87
87
id : Option [String ] = None ,
88
88
status : Option [ModelStatus ] = None
89
- ) = tools.FunctionToolCall (arguments, callId, name, id, status)
89
+ ) = FunctionToolCall (
90
+ arguments,
91
+ callId,
92
+ name,
93
+ id,
94
+ status
95
+ )
90
96
91
97
def ofFunctionToolCallOutput (
92
98
callId : String ,
93
99
output : String ,
94
100
id : Option [String ] = None ,
95
101
status : Option [ModelStatus ] = None
96
- ) = tools.FunctionToolCallOutput (callId, output, id, status)
102
+ ) = FunctionToolCallOutput (
103
+ callId,
104
+ output,
105
+ id,
106
+ status
107
+ )
97
108
98
109
def ofReasoning (
99
110
id : String ,
0 commit comments