From 1deea783a1fb19da60f73d916212b88e3ebd536a Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Thu, 27 Mar 2025 16:48:42 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=88=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=89:=20=20brand=20dna=20generate=20fix=EF=BC=88=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug=EF=BC=89:=20docs=EF=BC=88=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=EF=BC=89:=20refactor=EF=BC=88=E9=87=8D?= =?UTF-8?q?=E6=9E=84=EF=BC=89:=20test(=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/brand_dna/service_generate_brand_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/service/brand_dna/service_generate_brand_info.py b/app/service/brand_dna/service_generate_brand_info.py index 73c1294..367a4d6 100644 --- a/app/service/brand_dna/service_generate_brand_info.py +++ b/app/service/brand_dna/service_generate_brand_info.py @@ -41,7 +41,7 @@ class GenerateBrandInfo: self.output_parser = StructuredOutputParser.from_response_schemas(self.response_schemas) self.format_instructions = self.output_parser.get_format_instructions() self.prompt = PromptTemplate( - template="你是一个时装品牌的设计师。根据用户输入提取出brand name,brand slogan,brand logo 描述。如果没有以上内容,需要你根据用户输入随意发挥。随后根据brand logo 描述生成一个prompt,这个prompt用于生成模型.\n{format_instructions}\n{question}", + template="你是一个时装品牌的设计师。根据用户输入提取出brand name,brand slogan,brand logo 描述。如果没有以上内容,需要你根据用户输入随意发挥。随后根据brand logo 描述生成一个prompt,这个prompt用于生成模型,prompt需要完全表达用户的想法并使用英文,使用简洁明了的单词不要过长。.\n{format_instructions}\n{question}", input_variables=["question"], partial_variables={"format_instructions": self.format_instructions} ) @@ -98,7 +98,7 @@ class GenerateBrandInfo: if __name__ == '__main__': request_data = GenerateBrandModel( user_id="89", - prompt="xiaomi" + prompt="华为" ) service = GenerateBrandInfo(request_data) print(service.get_result())