how to support Ali DashScope API
- Dominant language
- Python
- Stars
- 38.6k
- Forks
- 2.7k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 3
Description
from langextract.providers.openai import OpenAILanguageModel
result = lx.extract(
text_or_documents=input_text,
prompt_description=prompt,
examples=examples,
# model_id="qwen-plus",
# api_key="sk-c5da949104109e6d44e",
# model_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
fence_output=True,
use_schema_constraints=False,
language_model_type=OpenAILanguageModel,#lx.inference.OpenAILanguageModel,#lx.providers.openai.OpenAILanguageModel,
language_model_params={'base_url': 'https://dashscope.aliyuncs.com/compatible-mode/v1', 'api_key':"sk-c5da949144e", 'model_id':"qwen-plus"}
)
Contributor guide
Research direction
Start with langextract.providers.openai.OpenAILanguageModel and the lx.extract example in the issue, including its language_model_params values for base_url, api_key, and model_id. Determine what project change is needed for the DashScope-compatible endpoint; done should mean the shown qwen-plus configuration is supported and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100