OpenAIProvider class
Methods
-
addAllMessage(List<AIMessage> messages)
→ void
-
Add a message to conversation history
inherited
-
addContextMemory(String text)
→ void
-
Add a text snippet to context memory
inherited
-
addMessage(String role, String content)
→ void
-
Add a message to conversation history
inherited
-
buildPayload(String model, String? prompt, int maxTokens, bool includeHistory)
→ dynamic
-
Build payload — can be overridden per provider
inherited
-
clearContextMemory()
→ void
-
Clear all context memory
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
request({required String model, String? prompt, bool includeHistory = true, bool includeContext = true, int maxTokens = 256})
→ Future<FlintResponse>
-
Sends a request to AI with optional history and context
inherited
-
resetHistory()
→ void
-
Reset conversation history
inherited
-
sendRequest(String model, dynamic payload)
→ Future<FlintResponse>
-
Must be implemented by each provider (Gemini, HF, etc.)
override
-
toString()
→ String
-
A string representation of this object.
inherited