import { TChatType } from "./chat-history.interface";

export const chatHistorySearchableFields = ['title'];

export const CHAT_TYPE: { [key in TChatType]: TChatType } = {
	text: 'text',
	image: 'image',
	url: 'url',
	file: 'file',
}


export const CHAT_FUNCTION_CALL_TYPES = {
	GET_UPTO_DATE_DATA: "get_up_to_date_information",
	GET_DATA_FROM_URL: "get_data_from_url",
	GENERATE_IMAGE: "create_image",
}


export const CHAT_GPT_FUNCTIONS_CALLS = [
	{
		name: CHAT_FUNCTION_CALL_TYPES.GET_UPTO_DATE_DATA,
		description: 'Get up to date information from the web',
		parameters: {
			type: 'object',
			properties: {
				quary: {
					type: 'string',
					description:
						'Specify your query to fetch the latest information from the web.',
				},
			},
			required: ['quary'],
		},
	},
	{
		name: CHAT_FUNCTION_CALL_TYPES.GET_DATA_FROM_URL,
		description: 'Get data from a specific url',
		parameters: {
			type: 'object',
			properties: {
				url: {
					type: 'string',
					description: 'Specify the url that user wants to fetch data from.',
				},
			},
			required: ['url'],
		},
	},
	{
		name: CHAT_FUNCTION_CALL_TYPES.GENERATE_IMAGE,
		description: 'Create an image from a description',
		parameters: {
			type: 'object',
			properties: {
				description: {
					type: 'string',
					description:
						'Provide a detailed description for the image you want to create. the description must alawis be in english ',
				},
			},
			required: ['description'],
		},
	},
]

export const CLAUDE_FUNCTIONS_CALLS = [
	{
		name: CHAT_FUNCTION_CALL_TYPES.GET_UPTO_DATE_DATA,
		description: 'Get up to date information from the web. Always give answers based on the language you are asked on',
		input_schema: {
			type: 'object',
			properties: {
				quary: {
					type: 'string',
					description:
						'Specify your query to fetch the latest information from the web.',
				},
			},
			required: ['quary'],
		},
	},
	{
		name: CHAT_FUNCTION_CALL_TYPES.GET_DATA_FROM_URL,
		description: 'Get information from a specific web address. Always give answers based on the language you are asked on',
		input_schema: {
			type: 'object',
			properties: {
				url: {
					type: 'string',
					description: 'Specify the url that user wants to fetch data from.',
				},
			},
			required: ['url'],
		},
	},
	{
		name: CHAT_FUNCTION_CALL_TYPES.GENERATE_IMAGE,
		description: 'Create an image from a description.',
		input_schema: {
			type: 'object',
			properties: {
				description: {
					type: 'string',
					description:
						'Provide a detailed description for the image you want to create. the description must alawis be in english ',
				},
			},
			required: ['description'],
		},
	},
]

export const BINA_STREAM_RESPONSE_DIVIDER = 'BINA_STREAM_RESPONSE_DIVIDER';
export const BINA_STREAM_REASONING_START = 'BINA_STREAM_REASONING_START';
export const BINA_STREAM_REASONING_END = 'BINA_STREAM_REASONING_END';