<commit_before>package connectors

import (
	"encoding/json"
	"fmt"
	"github.com/projectjane/jane/models"
	"io/ioutil"
	"log"
	"math/rand"
	"net/http"
	"net/url"
	"strings"
)

type ImageMe struct {
}

func (x ImageMe) Listen(commandMsgs chan<- models.Message, connector models.Connector) {
	defer Recovery(connector)
	return
}

func (x ImageMe) Command(message models.Message, publishMsgs chan<- models.Message, connector models.Connector) {
	if strings.Index(message.In.Text, "image me") == 0 {
		msg := strings.TrimSpace(strings.Replace(message.In.Text, "image me", "", 1))
		message.Out.Text = callImageMe(msg, connector.Key, connector.Pass, false)
		publishMsgs <- message
	}
	if strings.Index(message.In.Text, "animate me") == 0 {
		msg := strings.TrimSpace(strings.Replace(message.In.Text, "animate me", "", 1))
		message.Out.Text = callImageMe(msg, connector.Key, connector.Pass, true)
		publishMsgs <- message
	}
}

func (x ImageMe) Publish(connector models.Connector, message models.Message, target string) {
	return
}<commit_msg>Fix casing in image me connector<commit_after>package connectors

import (
	"encoding/json"
	"fmt"
	"github.com/projectjane/jane/models"
	"io/ioutil"
	"log"
	"math/rand"
	"net/http"
	"net/url"
	"strings"
)

type ImageMe struct {
}

func (x ImageMe) Listen(commandMsgs chan<- models.Message, connector models.Connector) {
	defer Recovery(connector)
	return
}

func (x ImageMe) Command(message models.Message, publishMsgs chan<- models.Message, connector models.Connector) {
	if strings.HasPrefix(strings.ToLower(message.In.Text), "image me") {
		msg := strings.TrimSpace(strings.Replace(message.In.Text, "image me", "", 1))
		message.Out.Text = callImageMe(msg, connector.Key, connector.Pass, false)
		publishMsgs <- message
	}
	if strings.HasPrefix(strings.ToLower(message.In.Text), "animate me") {
		msg := strings.TrimSpace(strings.Replace(message.In.Text, "animate me", "", 1))
		message.Out.Text = callImageMe(msg, connector.Key, connector.Pass, true)
		publishMsgs <- message
	}
}

func (x ImageMe) Publish(connector models.Connector, message models.Message, target string) {
	return
}
{'fraction_non_alphanumeric': 0.14372945044621888, 'fraction_numerical': 0.0028182245185533112, 'mean_word_length': 4.916666666666667, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5774055', 'n_tokens_mistral': 772, 'n_tokens_neox': 722, 'n_words': 163}