Skip to content

Commit

Permalink
return a text without the quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
dorbanianas committed Jan 13, 2025
1 parent b66464d commit 0acdc0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions/scalar/llm_complete/implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ std::vector<std::string> LlmComplete::Operation(duckdb::DataChunk& args) {
auto template_str = prompt_details.prompt;
auto response = model.CallComplete(template_str, false);

results.push_back(response.dump());
results.push_back(response.get<std::string>());
} else {
auto tuples = CastVectorOfStructsToJson(args.data[2], args.size());

auto responses = BatchAndComplete(tuples, prompt_details.prompt, ScalarFunctionType::COMPLETE, model);

results.reserve(responses.size());
for (const auto& response : responses) {
results.push_back(response.dump());
results.push_back(response.get<std::string>());
}
}
return results;
Expand Down

0 comments on commit 0acdc0b

Please sign in to comment.