Add support for Maritaca.AI API integration#35
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
Co-authored-by: cmagnobarbosa <10928556+cmagnobarbosa@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Adicionar suporte para API maritaca.AI
Add support for Maritaca.AI API integration
Jul 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive support for maritaca.ai API to the ProsaAI system, enabling the use of Portuguese-specialized Sabiá language models for generating ENEM essay themes.
What's Added
🤖 New Maritaca Provider
Maritacaprovider class following existing patternssabia-2,sabia-2-small,sabia-2-mediumhttps://chat.maritaca.ai/api/chat/completions🔧 Seamless Integration
ChatAPIandmake_llm_callfunctions🧪 Comprehensive Testing
📚 Complete Documentation
docs/MARITACA_INTEGRATION.mdwith usage examplesUsage Example
Or using the service layer:
Benefits
Configuration
Add to your
.envfile:Code Quality
Fixes #29.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
api.maritaca.aicurl -s REDACTED -H User-Agent: Mozilla/5.0(dns block)chat.maritaca.aicurl -s REDACTED -H User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36(dns block)docs.maritaca.aipython -c import requests try: resp = requests.get('REDACTED', timeout=10, headers={'User-Agent': 'Mozilla/5.0'}) print('Docs response:', resp.status_code) if resp.status_code == 200: if 'api' in resp.text.lower(): print('API info found in docs') except Exception as e: print('Error accessing docs:', e)(dns block)huggingface.copython -m pytest tests/ -v --tb=short(dns block)platform.maritaca.aicurl -s REDACTED -H User-Agent: Mozilla/5.0(dns block)www.maritaca.aicurl -s REDACTED(dns block)python -c import requests try: resp = requests.get('REDACTED', timeout=10, headers={'User-Agent': 'Mozilla/5.0'}) print('Website response:', resp.status_code) if resp.status_code == 200: content = resp.text.lower() api_mentions = [] if 'api' in content: print('API mentioned on website') if 'chat/completions' in content: print('OpenAI-compatible API detected') if 'maritaca-api' in content: print('Maritaca-specific API detected') except Exception as e: print('Error accessing website:', e)(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.