Skip to content

Commit

Permalink
[FIX] Displaying profile managers for Coverage model in Public share (#…
Browse files Browse the repository at this point in the history
…540)

* Disabling buttons

* Linting issues

* Fixing coverage model

* Fixing import issues

---------

Co-authored-by: Deepak K <[email protected]>
Co-authored-by: Neha <[email protected]>
  • Loading branch information
3 people authored Aug 12, 2024
1 parent 42ba8e0 commit 4279cde
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ import { useTokenUsageStore } from "../../../store/token-usage-store";
import { ProfileInfoBar } from "../profile-info-bar/ProfileInfoBar";

let publicOutputsApi;
let publicAdapterApi;
try {
publicOutputsApi =
require("../../../plugins/prompt-studio-public-share/helpers/PublicShareAPIs").publicOutputsApi;
publicAdapterApi =
require("../../../plugins/prompt-studio-public-share/helpers/PublicShareAPIs").publicAdapterApi;
} catch {
// The component will remain null of it is not available
}
Expand Down Expand Up @@ -172,12 +175,14 @@ function OutputForDocModal({
};

const getAdapterInfo = () => {
axiosPrivate
.get(`/api/v1/unstract/${sessionDetails.orgId}/adapter/?adapter_type=LLM`)
.then((res) => {
const adapterList = res.data;
setAdapterData(getLLMModelNamesForProfiles(llmProfiles, adapterList));
});
let url = `/api/v1/unstract/${sessionDetails.orgId}/adapter/?adapter_type=LLM`;
if (isPublicSource) {
url = publicAdapterApi(id, "LLM");
}
axiosPrivate.get(url).then((res) => {
const adapterList = res.data;
setAdapterData(getLLMModelNamesForProfiles(llmProfiles, adapterList));
});
};

const handleGetOutputForDocs = (profile = profileManagerId) => {
Expand Down

0 comments on commit 4279cde

Please sign in to comment.