providers/phind/phind library
Modular Phind Provider
This library provides a modular implementation of the Phind provider following the same architecture pattern as other providers.
Key Features:
- Specialized for coding and development tasks
- Phind-70B model with coding expertise
- Unique API format handling
- Modular architecture for easy maintenance
- Support for code generation and reasoning
Usage:
import 'package:llm_dart/providers/phind/phind.dart';
final provider = PhindProvider(PhindConfig(
apiKey: 'your-api-key',
model: 'Phind-70B',
));
// Use chat capability for coding questions
final response = await provider.chat([
ChatMessage.user('How do I implement a binary search in Dart?')
]);
// Use streaming for real-time code generation
await for (final event in provider.chatStream([
ChatMessage.user('Write a Flutter widget for a todo list')
])) {
if (event is TextDeltaEvent) {
print(event.text);
}
}
Classes
- PhindChat
- Phind Chat capability implementation
- PhindChatResponse
- Phind chat response implementation for parsed streaming responses
- PhindClient
- Phind HTTP client implementation
- PhindConfig
- Phind provider configuration
- PhindProvider
- Phind Provider implementation
Functions
-
createPhindCodeProvider(
{required String apiKey, String model = 'Phind-70B', double? temperature = 0.1, int? maxTokens = 4000, String? systemPrompt = 'You are an expert programmer. Provide clear, well-commented code solutions.'}) → PhindProvider - Create a Phind provider optimized for code generation
-
createPhindExplainerProvider(
{required String apiKey, String model = 'Phind-70B', double? temperature = 0.3, int? maxTokens = 2000, String? systemPrompt = 'You are a coding tutor. Explain code concepts clearly and provide examples.'}) → PhindProvider - Create a Phind provider optimized for code explanation
-
createPhindProvider(
{required String apiKey, String model = 'Phind-70B', String baseUrl = 'https://https.extension.phind.com/agent/', double? temperature, int? maxTokens, String? systemPrompt}) → PhindProvider - Create a Phind provider with default settings