Fix naming conflicts for ChatResponse
This commit is contained in:
@@ -13,7 +13,7 @@ class Provider::Openai < Provider
|
||||
|
||||
def chat_response(chat_history:, model: nil, instructions: nil, functions: [])
|
||||
provider_response do
|
||||
response = ChatResponse.new(
|
||||
processor = ChatResponseProcessor.new(
|
||||
client: client,
|
||||
model: model,
|
||||
chat_history: chat_history,
|
||||
@@ -21,7 +21,7 @@ class Provider::Openai < Provider
|
||||
available_functions: functions
|
||||
)
|
||||
|
||||
response.build
|
||||
processor.process
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Provider::Openai::ChatResponse
|
||||
class Provider::Openai::ChatResponseProcessor
|
||||
def initialize(client:, model:, chat_history:, instructions: nil, available_functions: [])
|
||||
@client = client
|
||||
@model = model
|
||||
@@ -7,7 +7,7 @@ class Provider::Openai::ChatResponse
|
||||
@input = build_initial_input(chat_history)
|
||||
end
|
||||
|
||||
def build
|
||||
def process
|
||||
response = client.responses.create(parameters: {
|
||||
model: model,
|
||||
input: input,
|
||||
Reference in New Issue
Block a user