mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Merge pull request #3010 from BerriAI/litellm_qa_adding_langfuse_callbacks
[UI] QA fixes adding langfuse callback
This commit is contained in:
commit
a27447408b
2 changed files with 20 additions and 22 deletions
|
|
@ -8123,7 +8123,7 @@ async def update_config(config_info: ConfigYAML):
|
|||
|
||||
Currently supports modifying General Settings + LiteLLM settings
|
||||
"""
|
||||
global llm_router, llm_model_list, general_settings, proxy_config, proxy_logging_obj, master_key
|
||||
global llm_router, llm_model_list, general_settings, proxy_config, proxy_logging_obj, master_key, prisma_client
|
||||
try:
|
||||
import base64
|
||||
|
||||
|
|
@ -8191,6 +8191,12 @@ async def update_config(config_info: ConfigYAML):
|
|||
# Save the updated config
|
||||
await proxy_config.save_config(new_config=config)
|
||||
|
||||
# make sure the change is instantly rolled out for langfuse
|
||||
if prisma_client is not None:
|
||||
await proxy_config.add_deployment(
|
||||
prisma_client=prisma_client, proxy_logging_obj=proxy_logging_obj
|
||||
)
|
||||
|
||||
# Test new connections
|
||||
## Slack
|
||||
if "slack" in config.get("general_settings", {}).get("alerting", []):
|
||||
|
|
|
|||
|
|
@ -147,8 +147,6 @@ const Settings: React.FC<SettingsPageProps> = ({
|
|||
<TableRow>
|
||||
<TableHeaderCell>Callback</TableHeaderCell>
|
||||
<TableHeaderCell>Callback Env Vars</TableHeaderCell>
|
||||
<TableHeaderCell></TableHeaderCell>
|
||||
{/* <TableHeaderCell>Test Callback</TableHeaderCell> */}
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
|
|
@ -159,29 +157,22 @@ const Settings: React.FC<SettingsPageProps> = ({
|
|||
</TableCell>
|
||||
<TableCell>
|
||||
<ul>
|
||||
{Object.entries(callback.variables).map(([key, value]) => (
|
||||
<li key={key}>
|
||||
<Text>{key}</Text>
|
||||
<TextInput
|
||||
name={key}
|
||||
defaultValue={value as string}
|
||||
type="password"
|
||||
/>
|
||||
</li>
|
||||
))}
|
||||
{Object.entries(callback.variables).map(([key, value]) => (
|
||||
<li key={key}>
|
||||
<Text className="mt-2">{key}</Text>
|
||||
{key === "LANGFUSE_HOST" ? (
|
||||
<p>default value="https://cloud.langfuse.com"</p>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
<TextInput name={key} defaultValue={value as string} type="password" />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<Button className="mt-2" onClick={() => handleSaveChanges(callback)}>
|
||||
Save Changes
|
||||
</Button>
|
||||
</TableCell>
|
||||
|
||||
<TableCell>
|
||||
|
||||
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
|
||||
<Button onClick={() => serviceHealthCheck(accessToken, callback.name)}>
|
||||
<Button onClick={() => serviceHealthCheck(accessToken, callback.name)} className="mx-2">
|
||||
Test Callback
|
||||
</Button>
|
||||
</TableCell>
|
||||
|
|
@ -192,6 +183,7 @@ const Settings: React.FC<SettingsPageProps> = ({
|
|||
<Button size="xs" className="mt-2" onClick={handleAddCallback}>
|
||||
Add Callback
|
||||
</Button>
|
||||
|
||||
</Card>
|
||||
|
||||
</Grid>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue