DSXiangLi commited on
Commit
d537b9c
1 Parent(s): c9023c8
Files changed (2) hide show
  1. ape/llm.py +1 -1
  2. ape/prompt.py +2 -4
ape/llm.py CHANGED
@@ -64,7 +64,7 @@ class LLMGPT(object):
64
  """
65
  prompt = ''
66
  for shot in few_shot:
67
- prompt += MyTemplate['few_shot_prompt'].format(shot[0], shot[1])
68
  print(prompt)
69
  result = self.gen_chain.generate(prompt)
70
  return result
 
64
  """
65
  prompt = ''
66
  for shot in few_shot:
67
+ prompt += MyTemplate['few_shot_prompt'].format(input=shot[0], output=shot[1])
68
  print(prompt)
69
  result = self.gen_chain.generate(prompt)
70
  return result
ape/prompt.py CHANGED
@@ -1,7 +1,5 @@
1
  # -*-coding:utf-8 -*-
2
- from langchain import PromptTemplate
3
-
4
- few_shot_prompt = "Input: {input}\nOutput: {output}"
5
 
6
  gen_user_prompt = '{few_shot}'
7
 
@@ -15,7 +13,7 @@ Everything between the ``` must be valid json. """
15
 
16
  eval_prompt = "Instruction: {prompt}\nInput: {input}\nOutput: {output}"
17
 
18
- test_sys_prompt = """I want you to act as an AI assisted doctor. You are capable of answering anything related to medical." \
19
  Given an instruction and input, you must come up with corresponding output, and always respond in chinese.
20
  """
21
 
 
1
  # -*-coding:utf-8 -*-
2
+ few_shot_prompt = "Input: {input}\nOutput: {output}\n"
 
 
3
 
4
  gen_user_prompt = '{few_shot}'
5
 
 
13
 
14
  eval_prompt = "Instruction: {prompt}\nInput: {input}\nOutput: {output}"
15
 
16
+ test_sys_prompt = """I want you to act as an AI assisted doctor. You are capable of answering anything related to medical.
17
  Given an instruction and input, you must come up with corresponding output, and always respond in chinese.
18
  """
19