mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
AIUI: PromptChanges + AIModelSelectorButton added to ToolGen
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:apidash_core/apidash_core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:apidash/consts.dart';
|
||||
import 'package:genai/genai.dart';
|
||||
import 'providers.dart';
|
||||
import '../models/models.dart';
|
||||
import '../services/services.dart';
|
||||
|
||||
@@ -51,7 +51,7 @@ API_RESPONSE: ```json
|
||||
:VAR_API_RESPONSE:
|
||||
```
|
||||
|
||||
Return only the Schema and nothing else
|
||||
Return only the Schema and nothing else and MAKE SURE TO USE the Actual VALUES instead of text placeholders. this is very important
|
||||
""";
|
||||
|
||||
class IntermediateRepresentationGen extends APIDashAIAgent {
|
||||
|
||||
@@ -8,7 +8,11 @@ You are an expert agent whose one and only task is to generate Server Driven UI
|
||||
You will be provided with the Rules of the SDUI language, schema, text description as follows:
|
||||
|
||||
SDUI CODE RULES:
|
||||
(
|
||||
$SAMPLE_STAC_RULESET
|
||||
)
|
||||
|
||||
DO NOT CREATE YOUR OWN SYNTAX. ONLY USE WHAT IS PROVIDED BY THE ABOVE RULES
|
||||
|
||||
# Style/Formatting Rules
|
||||
- No trailing commas. No comments. No undefined props.
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:convert';
|
||||
import 'package:apidash/apitoolgen/request_consolidator.dart';
|
||||
import 'package:apidash/apitoolgen/tool_templates.dart';
|
||||
import 'package:apidash/consts.dart';
|
||||
import 'package:apidash/screens/home_page/editor_pane/details_card/request_pane/ai_request/widgets/llm_selector.dart';
|
||||
import 'package:apidash/screens/common_widgets/ai/ai_model_selector_button.dart';
|
||||
import 'package:apidash/services/agentic_services/agent_caller.dart';
|
||||
import 'package:apidash/services/agentic_services/agents/apitool_bodygen.dart';
|
||||
import 'package:apidash/services/agentic_services/agents/apitool_funcgen.dart';
|
||||
@@ -393,12 +393,16 @@ class DefaultLLModelSelectorWidget extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
SizedBox(width: 5),
|
||||
DefaultLLMSelectorButton(
|
||||
defaultLLM: settings.defaultLLMSaveObject,
|
||||
onDefaultLLMUpdated: (d) {
|
||||
ref
|
||||
.read(settingsProvider.notifier)
|
||||
.update(defaultLLMSaveObject: d);
|
||||
AIModelSelectorButton(
|
||||
aiRequestModel:
|
||||
AIRequestModel.fromJson(settings.defaultAIModel ?? {}),
|
||||
onModelUpdated: (d) {
|
||||
ref.read(settingsProvider.notifier).update(
|
||||
defaultAIModel: d.copyWith(
|
||||
modelConfigs: [],
|
||||
stream: null,
|
||||
systemPrompt: '',
|
||||
userPrompt: '').toJson());
|
||||
},
|
||||
),
|
||||
kVSpacer5,
|
||||
|
||||
Reference in New Issue
Block a user