You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
amora.questions.Question.from_natural_language_prompt(prompt: str) -> Question: Classmethod para criação de uma Data Question a partir de uma pergunta em linguagem natural
amora.questions.Question.to_model(model_config: Optional[ModelConfig]) -> AmoraModel: Gera um AmoraModel a partir de uma data question
amora.ai.prompt_context() -> str: Retorna contexto de prompt considerando o schema dos modelos do AMORA_PROJECT_PATH
{ "prompt": "What are the available devices?", "completion": "DISTINCT device FROM `health`" }
{ "prompt": "What is the maximum heart rate observed today?", "completion": "MAX value FROM `heart_rate` WHERE DATE(creationDate) = CURRENT_DATE()" }
{ "prompt": "When was the maximum heart rate observed today?", "completion": "creationDate FROM `heart_rate` WHERE DATE(creationDate) = CURRENT_DATE() ORDER BY value DESC" }
{ "prompt": "How many steps where given today?", "completion": "SUM(value) FROM `diogo.steps` WHERE DATE(creationDate) = CURRENT_DATE()" }
{ "prompt": "How many steps where walked yesterday?", "completion": "SUM(value) FROM `apolo.steps` WHERE DATE(creationDate) = DATE_DIFF(CURRENT_DATE(), 1 DAY)" }
{ "prompt": "What's the average hours of sleep per night?", "completion": "AVG() FROM `sleep` WHERE DATE(creationDate) >= DATE_DIFF(CURRENT_DATE(), 7 DAY) GROUP BY DATE..." }
Prompt em inglês:
### BigQuery SQL tables, with their properties:
#
# amora-data-build-tool.amora.steps(id,sourceName,unit,value,device,creationDate,startDate,endDate)
# amora-data-build-tool.amora.heart_rate_agg(avg,sum,count,year,month)
# amora-data-build-tool.amora.health(id,type,sourceName,sourceVersion,unit,value,device,creationDate,startDate,endDate)
# amora-data-build-tool.amora.array_repeated_fields(str_arr,int_arr,id)
# amora-data-build-tool.amora.step_count_by_source(value_avg,value_sum,value_count,source_name,event_timestamp)
# amora-data-build-tool.amora.edge(from_node,to_node)
# amora-data-build-tool.amora.heart_rate_over_100(unit,value,creationDate,id)
# amora-data-build-tool.amora.heart_rate(id,sourceName,unit,value,device,creationDate,startDate,endDate)
# amora-data-build-tool.amora.steps_agg(avg,sum,count,year,month)
#
### A query to answer 'What are the available health devices?'
SELECT
### BigQuery SQL tables, with their properties:
#
# amora-data-build-tool.amora.steps(id,sourceName,unit,value,device,creationDate,startDate,endDate)
# amora-data-build-tool.amora.heart_rate_agg(avg,sum,count,year,month)
# amora-data-build-tool.amora.health(id,type,sourceName,sourceVersion,unit,value,device,creationDate,startDate,endDate)
# amora-data-build-tool.amora.array_repeated_fields(str_arr,int_arr,id)
# amora-data-build-tool.amora.step_count_by_source(value_avg,value_sum,value_count,source_name,event_timestamp)
# amora-data-build-tool.amora.edge(from_node,to_node)
# amora-data-build-tool.amora.heart_rate_over_100(unit,value,creationDate,id)
# amora-data-build-tool.amora.heart_rate(id,sourceName,unit,value,device,creationDate,startDate,endDate)
# amora-data-build-tool.amora.steps_agg(avg,sum,count,year,month)
#
### A query to answer 'Qual o total de passos dados até hoje?'
SELECT
Interfaces envolvidas
amora.questions.Question.from_natural_language_prompt(prompt: str) -> Question
: Classmethod para criação de uma Data Question a partir de uma pergunta em linguagem naturalamora.questions.Question.to_model(model_config: Optional[ModelConfig]) -> AmoraModel
: Gera um AmoraModel a partir de uma data questionamora.ai.prompt_context() -> str
: Retorna contexto de prompt considerando o schema dos modelos doAMORA_PROJECT_PATH
amora.ai.SQLPromptAnswer(completion: str, request_params: dict, question: Question)
:amora.ai.sql_translate(human_question: str) -> SQLPromptAnswer
:Exemplos
Prompt em inglês:
Completion
Prompt em português
Completion:
The text was updated successfully, but these errors were encountered: