Lucas ARRIESSE commited on
Commit
8a5bedd
·
1 Parent(s): a83bff5

Expose FTO individual topics

Browse files
Files changed (3) hide show
  1. api/solutions.py +1 -1
  2. schemas.py +7 -3
  3. static/js/gen.js +2 -2
api/solutions.py CHANGED
@@ -191,4 +191,4 @@ async def search_prior_art(req: PriorArtSearchRequest, prompt_env: Environment =
191
  {"role": "user", "content": consolidation_prompt}
192
  ], temperature=0.5)
193
 
194
- return PriorArtSearchResponse(content=consolidation_completion.choices[0].message.content, references=[])
 
191
  {"role": "user", "content": consolidation_prompt}
192
  ], temperature=0.5)
193
 
194
+ return PriorArtSearchResponse(content=consolidation_completion.choices[0].message.content, topic_contents=topics)
schemas.py CHANGED
@@ -136,7 +136,9 @@ class InsightFinderConstraintItem(BaseModel):
136
  class InsightFinderConstraintsList(BaseModel):
137
  constraints: list[InsightFinderConstraintItem]
138
 
139
- #TODO: aller voir la doc, breakage API
 
 
140
  class Technology(BaseModel):
141
  """Represents a single technology entry with its details."""
142
  title: str = Field(..., alias="name")
@@ -145,7 +147,6 @@ class Technology(BaseModel):
145
  limitations: str
146
 
147
 
148
-
149
  class TechnologyData(BaseModel):
150
  """Represents the top-level object containing a list of technologies."""
151
  technologies: List[Technology]
@@ -216,6 +217,7 @@ class _RefinedSolutionModel(BaseModel):
216
 
217
  # ===========================================================================
218
 
 
219
  class PriorArtSearchRequest(BaseModel):
220
  topics: list[str] = Field(
221
  ..., description="The list of topics to search for to create an exhaustive prior art search for a problem draft.")
@@ -223,6 +225,8 @@ class PriorArtSearchRequest(BaseModel):
223
 
224
 
225
  class PriorArtSearchResponse(BaseModel):
 
226
  content: str
227
- references: list[dict]
 
228
  pass
 
136
  class InsightFinderConstraintsList(BaseModel):
137
  constraints: list[InsightFinderConstraintItem]
138
 
139
+ # TODO: aller voir la doc, breakage API
140
+
141
+
142
  class Technology(BaseModel):
143
  """Represents a single technology entry with its details."""
144
  title: str = Field(..., alias="name")
 
147
  limitations: str
148
 
149
 
 
150
  class TechnologyData(BaseModel):
151
  """Represents the top-level object containing a list of technologies."""
152
  technologies: List[Technology]
 
217
 
218
  # ===========================================================================
219
 
220
+
221
  class PriorArtSearchRequest(BaseModel):
222
  topics: list[str] = Field(
223
  ..., description="The list of topics to search for to create an exhaustive prior art search for a problem draft.")
 
225
 
226
 
227
  class PriorArtSearchResponse(BaseModel):
228
+ # Final consolidation report contents
229
  content: str
230
+ # Individual search topic contents
231
+ topic_contents: list[dict]
232
  pass
static/js/gen.js CHANGED
@@ -38,6 +38,8 @@ export async function performDeepSearch(topics) {
38
  body: JSON.stringify({ topics: topics })
39
  });
40
  const results = await response.json();
 
 
41
  return results.content;
42
  }
43
 
@@ -307,8 +309,6 @@ export async function runFTOAnalysis(providerUrl, providerModel, apiKey, solutio
307
 
308
  const fto_report = await performDeepSearch(fto_topics.topics);
309
 
310
- console.log(fto_report);
311
-
312
  const assess_results = await assessFTOReport(providerUrl, providerModel, apiKey, solution, fto_report, portfolio_info);
313
  console.log(assess_results.extracted_info);
314
 
 
38
  body: JSON.stringify({ topics: topics })
39
  });
40
  const results = await response.json();
41
+
42
+ console.log(results);
43
  return results.content;
44
  }
45
 
 
309
 
310
  const fto_report = await performDeepSearch(fto_topics.topics);
311
 
 
 
312
  const assess_results = await assessFTOReport(providerUrl, providerModel, apiKey, solution, fto_report, portfolio_info);
313
  console.log(assess_results.extracted_info);
314