mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-15 22:35:54 +08:00
Nick: fixes
This commit is contained in:
parent
8cfc946cae
commit
4902d0ac64
@ -13,7 +13,7 @@ import os
|
|||||||
|
|
||||||
from .firecrawl import FirecrawlApp # noqa
|
from .firecrawl import FirecrawlApp # noqa
|
||||||
|
|
||||||
__version__ = "1.13.3"
|
__version__ = "1.13.5"
|
||||||
|
|
||||||
# Define the logger for the Firecrawl project
|
# Define the logger for the Firecrawl project
|
||||||
logger: logging.Logger = logging.getLogger("firecrawl")
|
logger: logging.Logger = logging.getLogger("firecrawl")
|
||||||
|
@ -669,17 +669,23 @@ class FirecrawlApp:
|
|||||||
schema = schema.model_json_schema()
|
schema = schema.model_json_schema()
|
||||||
# Otherwise assume it's already a JSON schema dict
|
# Otherwise assume it's already a JSON schema dict
|
||||||
|
|
||||||
jsonData = {'urls': urls, **params}
|
|
||||||
request_data = {
|
request_data = {
|
||||||
**jsonData,
|
'urls': urls,
|
||||||
'allowExternalLinks': params.get('allow_external_links', params.get('allowExternalLinks', False)),
|
'allowExternalLinks': params.get('allow_external_links', params.get('allowExternalLinks', False)),
|
||||||
'enableWebSearch': params.get('enable_web_search', params.get('enableWebSearch', False)),
|
'enableWebSearch': params.get('enable_web_search', params.get('enableWebSearch', False)),
|
||||||
'showSources': params.get('show_sources', params.get('showSources', False)),
|
'showSources': params.get('show_sources', params.get('showSources', False)),
|
||||||
'systemPrompt': params.get('system_prompt', params.get('systemPrompt', None)),
|
|
||||||
'schema': schema,
|
'schema': schema,
|
||||||
'origin': 'api-sdk'
|
'origin': 'api-sdk'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Only add prompt and systemPrompt if they exist
|
||||||
|
if params.get('prompt'):
|
||||||
|
request_data['prompt'] = params['prompt']
|
||||||
|
if params.get('system_prompt'):
|
||||||
|
request_data['systemPrompt'] = params['system_prompt']
|
||||||
|
elif params.get('systemPrompt'): # Check legacy field name
|
||||||
|
request_data['systemPrompt'] = params['systemPrompt']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Send the initial extract request
|
# Send the initial extract request
|
||||||
response = self._post_request(
|
response = self._post_request(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user