Skip to content

Commit fefb611

Browse files
committed
Formatting
1 parent 7a2d3ca commit fefb611

File tree

1 file changed

+87
-87
lines changed
  • openai-core/src/main/scala/io/cequence/openaiscala/domain/responsesapi

1 file changed

+87
-87
lines changed

openai-core/src/main/scala/io/cequence/openaiscala/domain/responsesapi/Input.scala

+87-87
Original file line numberDiff line numberDiff line change
@@ -19,97 +19,97 @@ trait Input
1919
sealed trait Inputs
2020

2121
object Inputs {
22-
case class Text(text: String) extends Inputs
22+
case class Text(text: String) extends Inputs
2323

24-
case class Items(items: Input*) extends Inputs
24+
case class Items(items: Input*) extends Inputs
2525
}
2626

2727
// shortcuts for creating Inputs
2828
object Input {
2929

30-
def ofInputTextMessage(
31-
content: String,
32-
role: ChatRole
33-
) = Message.InputText(content, role)
34-
35-
def ofInputSystemTextMessage(
36-
content: String
37-
) = Message.System(content)
38-
39-
def ofInputDeveloperTextMessage(
40-
content: String
41-
) = Message.Developer(content)
42-
43-
def ofInputUserTextMessage(
44-
content: String
45-
) = Message.User(content)
46-
47-
def ofInputAssistantTextMessage(
48-
content: String
49-
) = Message.Assistant(content)
50-
51-
def ofInputMessage(
52-
content: Seq[InputMessageContent],
53-
role: ChatRole,
54-
status: Option[ModelStatus] = None
55-
) = Message.InputContent(content, role, status)
56-
57-
def ofOutputMessage(
58-
content: Seq[OutputMessageContent],
59-
id: String,
60-
status: ModelStatus
61-
) = Message.OutputContent(content, id, status)
62-
63-
def ofFileSearchToolCall(
64-
id: String,
65-
queries: Seq[String] = Nil,
66-
status: ModelStatus,
67-
results: Seq[tools.FileSearchResult] = Nil
68-
) = tools.FileSearchToolCall(id, queries, status, results)
69-
70-
def ofComputerToolCall(
71-
action: tools.ComputerToolAction,
72-
callId: String,
73-
id: String,
74-
pendingSafetyChecks: Seq[tools.PendingSafetyCheck] = Nil,
75-
status: ModelStatus
76-
) = tools.ComputerToolCall(action, callId, id, pendingSafetyChecks, status)
77-
78-
def ofComputerToolCallOutput(
79-
callId: String,
80-
output: tools.ComputerScreenshot,
81-
acknowledgedSafetyChecks: Seq[tools.AcknowledgedSafetyCheck] = Nil,
82-
id: Option[String] = None,
83-
status: Option[ModelStatus] = None
84-
) = tools.ComputerToolCallOutput(callId, output, acknowledgedSafetyChecks, id, status)
85-
86-
def ofWebSearchToolCall(
87-
id: String,
88-
status: ModelStatus
89-
) = tools.WebSearchToolCall(id, status)
90-
91-
def ofFunctionToolCall(
92-
arguments: String,
93-
callId: String,
94-
name: String,
95-
id: Option[String] = None,
96-
status: Option[ModelStatus] = None
97-
) = tools.FunctionToolCall(arguments, callId, name, id, status)
98-
99-
def ofFunctionToolCallOutput(
100-
callId: String,
101-
output: String,
102-
id: Option[String] = None,
103-
status: Option[ModelStatus] = None
104-
) = tools.FunctionToolCallOutput(callId, output, id, status)
105-
106-
def ofReasoning(
107-
id: String,
108-
summary: Seq[ReasoningText],
109-
status: Option[ModelStatus] = None
110-
) = Reasoning(id, summary, status)
111-
112-
def ofItemReference(
113-
id: String
114-
) = ItemReference(id)
30+
def ofInputTextMessage(
31+
content: String,
32+
role: ChatRole
33+
) = Message.InputText(content, role)
34+
35+
def ofInputSystemTextMessage(
36+
content: String
37+
) = Message.System(content)
38+
39+
def ofInputDeveloperTextMessage(
40+
content: String
41+
) = Message.Developer(content)
42+
43+
def ofInputUserTextMessage(
44+
content: String
45+
) = Message.User(content)
46+
47+
def ofInputAssistantTextMessage(
48+
content: String
49+
) = Message.Assistant(content)
50+
51+
def ofInputMessage(
52+
content: Seq[InputMessageContent],
53+
role: ChatRole,
54+
status: Option[ModelStatus] = None
55+
) = Message.InputContent(content, role, status)
56+
57+
def ofOutputMessage(
58+
content: Seq[OutputMessageContent],
59+
id: String,
60+
status: ModelStatus
61+
) = Message.OutputContent(content, id, status)
62+
63+
def ofFileSearchToolCall(
64+
id: String,
65+
queries: Seq[String] = Nil,
66+
status: ModelStatus,
67+
results: Seq[tools.FileSearchResult] = Nil
68+
) = tools.FileSearchToolCall(id, queries, status, results)
69+
70+
def ofComputerToolCall(
71+
action: tools.ComputerToolAction,
72+
callId: String,
73+
id: String,
74+
pendingSafetyChecks: Seq[tools.PendingSafetyCheck] = Nil,
75+
status: ModelStatus
76+
) = tools.ComputerToolCall(action, callId, id, pendingSafetyChecks, status)
77+
78+
def ofComputerToolCallOutput(
79+
callId: String,
80+
output: tools.ComputerScreenshot,
81+
acknowledgedSafetyChecks: Seq[tools.AcknowledgedSafetyCheck] = Nil,
82+
id: Option[String] = None,
83+
status: Option[ModelStatus] = None
84+
) = tools.ComputerToolCallOutput(callId, output, acknowledgedSafetyChecks, id, status)
85+
86+
def ofWebSearchToolCall(
87+
id: String,
88+
status: ModelStatus
89+
) = tools.WebSearchToolCall(id, status)
90+
91+
def ofFunctionToolCall(
92+
arguments: String,
93+
callId: String,
94+
name: String,
95+
id: Option[String] = None,
96+
status: Option[ModelStatus] = None
97+
) = tools.FunctionToolCall(arguments, callId, name, id, status)
98+
99+
def ofFunctionToolCallOutput(
100+
callId: String,
101+
output: String,
102+
id: Option[String] = None,
103+
status: Option[ModelStatus] = None
104+
) = tools.FunctionToolCallOutput(callId, output, id, status)
105+
106+
def ofReasoning(
107+
id: String,
108+
summary: Seq[ReasoningText],
109+
status: Option[ModelStatus] = None
110+
) = Reasoning(id, summary, status)
111+
112+
def ofItemReference(
113+
id: String
114+
) = ItemReference(id)
115115
}

0 commit comments

Comments
 (0)