Fix naming conflicts for ChatResponse

This commit is contained in:
Zach Gollwitzer
2025-03-24 19:32:53 -04:00
parent 3be4eb3528
commit 0ac1c458fb
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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,