Nathan Slaughter commited on
Commit
6df6d81
·
1 Parent(s): e5d1a79

increase max tokens to 8192

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -19,14 +19,13 @@ class Terraform(BaseModel):
19
  """
20
  A Terraform module with a list of resources, provider, and configuration files.
21
  """
22
- readme: str = Field(..., description="A readme for the module.")
23
  main_tf: str = Field(..., description="The main Terraform configuration file.")
24
  variables_tf: str = Field(..., description="The Terraform variables configuration file.")
25
  outputs_tf: str = Field(..., description="The Terraform outputs configuration file.")
26
 
27
  def generate(resources: str, provider: str, model: str, api_key: str = "") -> Tuple[str, str, str]:
28
  try:
29
- llm = ChatOpenAI(model=model, temperature=0.7, max_tokens=4096)
30
  structured_llm = llm.with_structured_output(Terraform)
31
  response = structured_llm.invoke(f"""You are an expert SRE assistant specialized in Terraform.
32
 
 
19
  """
20
  A Terraform module with a list of resources, provider, and configuration files.
21
  """
 
22
  main_tf: str = Field(..., description="The main Terraform configuration file.")
23
  variables_tf: str = Field(..., description="The Terraform variables configuration file.")
24
  outputs_tf: str = Field(..., description="The Terraform outputs configuration file.")
25
 
26
  def generate(resources: str, provider: str, model: str, api_key: str = "") -> Tuple[str, str, str]:
27
  try:
28
+ llm = ChatOpenAI(model=model, temperature=0.7, max_tokens=8192)
29
  structured_llm = llm.with_structured_output(Terraform)
30
  response = structured_llm.invoke(f"""You are an expert SRE assistant specialized in Terraform.
31