Skip to content

Conversation

@hk238
Copy link
Collaborator

@hk238 hk238 commented Apr 28, 2025

Description

Added an example generation function on the chat tab based on the Content Heavy Prototype.

Implementation Details

frontend/src/pages/chat/index.tsx

When the user clicks the example generation button, a suggestExamples() request is sent.

backend/nlp.py & backend/server.py

Added payload support required for future web search requests.

Although the current example request is a plain generation request, there is support for web search requests.
Web search requests require an additional payload, such as:

tools: [{ type: "web_search_preview" }]

Problems

The original plan for example generation focused on providing reliable links. However, the current OpenAI model used in our app does not seem to support URL-related functionality.

According to the official documentation, a web search request response should include an annotations object. However, when implementing a web search preview request, the response did not contain the annotations object.

For this reason, a plain generation request was implemented for this branch. However, URL gernation have failed again. It appears that the model currently used by our app does not support web search functionality.


Screenshot

Base automatically changed from feat/reinstate-chat to main May 29, 2025 14:06
@kcarnold
Copy link
Contributor

@hk238 What do you recommend we do with this functionality?

@kcarnold kcarnold marked this pull request as draft June 18, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants