playwright-代理相关
· 2 min read
调用自己函数
https://github.com/langflow-ai/langflow/discussions/1272
错误
Fernet key must be 32 url-safe base64-encoded bytes.
https://github.com/langflow-ai/langflow/discussions/1521
在这里生成, 更新环境变量
- name: "LANGFLOW_SECRET_KEY"
value: "xxxxx="
然后 重新部署
json format 时候
'messages' must contain theword 'json' in some form, to use 'response_format' of type 'json_object
提示词 需要包含
import os
from openai import AzureOpenAI
client = AzureOpenAI(
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
api_version="2024-03-01-preview"
)
response = client.chat.completions.create(
model="gpt-4-0125-Preview", # Model = should match the deployment name you chose for your 0125-Preview model deployment
response_format={ "type": "json_object" },
messages=[
{"role": "system", "content": "You are a helpful assistant designed to output JSON."},
{"role": "user", "content": "Who won the world series in 2020?"}
]
)
print(response.choices[0].message.content)