-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Morph updates #5918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Morph updates #5918
Conversation
Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic. |
✅ Deploy Preview for continuedev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
} | ||
|
||
const data = (await resp.json()) as any; | ||
const results = data.results.sort((a: any, b: any) => a.index - b.index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code assumes data.results exists and is an array without validation. If the API response doesn't include a 'results' property or if it's not an array, this will cause a runtime error. Additionally, using 'any' type for sort parameters loses type safety. The code should validate the response structure and use proper typing.
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
@@ -18,6 +18,7 @@ import BedrockImport from "./BedrockImport"; | |||
import Cerebras from "./Cerebras"; | |||
import Cloudflare from "./Cloudflare"; | |||
import Cohere from "./Cohere"; | |||
import Morph from "./Morph" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code attempts to import a non-existent module './Morph'. The Morph.ts file does not exist in the core/llm/llms directory. This will cause a runtime error when the module tries to load, as Node.js/TypeScript will fail to resolve the import. The module must be created before it can be imported.
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
@@ -116,6 +117,7 @@ export const LLMClasses = [ | |||
SiliconFlow, | |||
Scaleway, | |||
Relace, | |||
Morph, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the non-existent Morph class to LLMClasses array will cause a runtime error. The Morph class is undefined since its module doesn't exist, and this will cause a runtime error when the array is used in llmFromDescription or llmFromProviderAndOptions functions. The Morph implementation must be created and properly implement the ILLM interface before being added to LLMClasses.
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
😱 Found 3 issues. Time to roll up your sleeves! 😱 |
Some morph updates
Incomplete, need openAI adapters