Update null-check function for aibitat runners (#3283)

* Update nullcheck function for aibitat runners

resolves #3273
closes #3277

* lint
This commit is contained in:
Timothy Carambat 2025-02-19 10:21:31 -08:00 committed by GitHub
parent 43e29d6f9b
commit dec13beb6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 22 additions and 22 deletions

View File

@ -116,7 +116,7 @@ class AnthropicProvider extends Provider {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
const [systemPrompt, chats] = this.#parseSystemPrompt(messages); const [systemPrompt, chats] = this.#parseSystemPrompt(messages);
const response = await this.client.messages.create( const response = await this.client.messages.create(

View File

@ -53,7 +53,7 @@ class ApiPieProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -48,7 +48,7 @@ class AzureOpenAiProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -89,7 +89,7 @@ class AWSBedrockProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -55,7 +55,7 @@ class DeepSeekProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -55,7 +55,7 @@ class FireworksAIProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -61,7 +61,7 @@ class GenericOpenAiProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -54,7 +54,7 @@ class GroqProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -53,7 +53,7 @@ class KoboldCPPProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -53,7 +53,7 @@ class LiteLLMProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -61,7 +61,7 @@ class LMStudioProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -55,7 +55,7 @@ class LocalAiProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;

View File

@ -57,7 +57,7 @@ class MistralProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -57,7 +57,7 @@ class NovitaProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {
const { toolCall, text } = await this.functionCall( const { toolCall, text } = await this.functionCall(

View File

@ -54,7 +54,7 @@ class NvidiaNimProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -49,7 +49,7 @@ class OllamaProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -62,7 +62,7 @@ class OpenAIProvider extends Provider {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
const response = await this.client.chat.completions.create({ const response = await this.client.chat.completions.create({
model: this.model, model: this.model,

View File

@ -57,7 +57,7 @@ class OpenRouterProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -53,7 +53,7 @@ class PerplexityProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -52,7 +52,7 @@ class TextWebGenUiProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -53,7 +53,7 @@ class TogetherAIProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {

View File

@ -53,7 +53,7 @@ class XAIProvider extends InheritMultiple([Provider, UnTooled]) {
* @param functions * @param functions
* @returns The completion. * @returns The completion.
*/ */
async complete(messages, functions = null) { async complete(messages, functions = []) {
try { try {
let completion; let completion;
if (functions.length > 0) { if (functions.length > 0) {